![]() |
[Share]Global Teleporter
Not sure if many people would find this usefull, it's my first "big" project in AI. I don't think I don't need to go over it much.. It's just a global gk that charges 2k adena for each port. And if you have a certain item, it lets your teleport free. Also checks if your a GM to use the GM teleports. And there is a Karma Check, if you have any karma, you can't teleport. I'm sure you can tweak it a bit to how you like it.
~Frozen Edit : I'd also like to thanks Fabian and Kenster for helping me get started with NASC. Thanks again guys ^^ Вложения из исходного сообщения (сами файлы в копии отсутствуют): global_teleporter_108.rar — 12628 байт |
interested, but... where it can use? GM use bookmarks or not have access to summon this npc. Add this to standart class?
class teleporter : globalteleporter ? next. Your code very bigger. You must find way for optimise this. Example, first sample Code:
if (ask == 1 && reply == 5) { //Talking IslandCode:
if (ask == 1 && reply == 5) |
I think this code need "heavy" optimization ;)
Look, you take 2k adena every time for teleports, if player haven't item @chrono_campana. And you check every time for that item, if player haven't that item - you delete 2k adena and teleport him. 1. You haven't check, if player have 2k adena. You just delete it. 2. You have check for item @chrono_campana in every teleport. More optimized will be: Code:
EventHandler MENU_SELECTED(ask, reply, talker, i0, i1) { |
Well like I said.. first big project like that, still learnin NASC. Thanks for the help guys :)
|
I've tested it,mainland places doesn't work O.o
|
Quote:
|
Ooh yeah, gotta resave the mainland.htm into unicode.. sorry bout that one :X
|
Not bad work Frozen :)
I kinda sead befor that i wanted 2 try make a VIP/Hero type of gatekeeper and shop :P pleassse Share some shops >.< <3 ^^ |
Good job thanks a lot man.. Even compiled AI. gg :D Btw, has any of you compiled the subclass.txt from the attachments file? (subclass_663.rar)
|
| All times are GMT. The time now is 15:48. |