• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Some tries of Town Portal Guard/s

Junior Spellweaver
Joined
Nov 17, 2011
Messages
106
Reaction score
8
Hey guys I coded a simply "Portal Guard" hmm..
You just need 3 npc's for your citys ofc you can make each npc for a Map Link Gate but I think its a bit cooler, and you havent a questions like "You want to teleport to Roumen?" or something.
Heres the Code, maybe it help someone:
NPC Names(InxName) You have to create this NPC's(I used the Battlefield Guard):
GateEld
GateUrg
GateBera

open [main]
var InterruptBlock 1
InterruptArg 2
PlayerHandle ""
Celebrant 0 ; ÁøÇàÀÚ
Book 0 ; ¼­¾àÀÇ Ã¥
Door 0 ; ¸·ÀÚ
Gate 0 ; °ÔÀÌÆ®
GateRou 0 ; °ÔÀÌÆ®
GateEld 0 ; °ÔÀÌÆ®
GateUrg 0 ; °ÔÀÌÆ®
GateBera 0 ; °ÔÀÌÆ®
.
interruptclear.
interruptset TimeOut "" 1 "WeddingEnd".



npcstand GateEld "GateEld" 4165 4730 27 1000 "Normal".
npcstand GateUrg "GateUrg" 4131 4813 27 1000 "Normal".
npcstand GateBera"GateBera" 4088 4898 27 1000 "Normal".
interruptset NPCClickHandle "" 1 Gate "GateClick".
interruptset NPCClickHandle "" 1 GateRou "RouClick".
interruptset NPCClickHandle "" 1 GateEld "EldClick".
interruptset NPCClickHandle "" 1 GateUrg "RouVal01Click".
interruptset NPCClickHandle "" 1 GateBera "EldGbl02Click".


infinite
open
waitinterrupt InterruptBlock "InterruptArg".
call InterruptBlock.
close

call "RouClick".
call "EldClick".
call "RouVal01Click".
call "EldGbl02Click".
close

open [RouClick]
var mclicker 0.
whoclickme mclicker InterruptArg.
linkto mclicker "Rou" "Rou" 6842 8756.
interruptclear.
interruptset NPCClickHandle "" 1 Rou "RouClick".
close
open [EldClick]
var mclicker 0.
whoclickme mclicker InterruptArg.
linkto mclicker "Eld" "Eld" 17214 13445.
interruptclear.
interruptset NPCClickHandle "" 1 Eld "EldClick".
close
open [RouVal01Click]
var mclicker 0.
whoclickme mclicker InterruptArg.
linkto mclicker "Urg" "Urg" 6293 5477.
interruptclear.
interruptset NPCClickHandle "" 1 RouVal01 "RouVal01Click".
close
open [EldGbl02Click]
var mclicker 0.
whoclickme mclicker InterruptArg.
linkto mclicker "Bera" "Bera" 6532 1529.
interruptclear.
interruptset NPCClickHandle "" 1 EldGbl02 "EldGbl02Click".
close
open [GateEnd]

close
 
Skilled Illusionist
Joined
Jul 12, 2011
Messages
386
Reaction score
88
Its cool that you scripted this but i was wondering why you wouldn't just make the gates in the npc.txt. I would think it is easier. Or am i missing something?
 
Junior Spellweaver
Joined
Nov 17, 2011
Messages
106
Reaction score
8
It's right but here can you add your own scripts and events :).
 
Newbie Spellweaver
Joined
Nov 11, 2012
Messages
10
Reaction score
0
______________________________________________________
 
Last edited:
Back
Top