r4d4, on Oct 23 2007, 09:17 PM, said:
OnInit is fired when the zone initially compiles the script on start up
as far as i remember the only events usable for player interaction (showing a dialog, giving items and so on) are OnTouch which gets fired when a player gets near the npc and OnClick which gets triggered when the npc is clicked.
stuff like OnCommand, OnTimer and OnMyMobDeath dont are triggered by the script itself, atleast thats how they worked with the last zone i got my hands on (asb4 i think)
so i doubt that it would work the way you described it, unless they changed the way the events work in the newer zones that hit the board
OK so heres what I was able to create Error free....But it's still not 100% what I want....Infact, Some extra functions are needed which I need a helping hand on too....
I was messing around with some commands and was able to learn how to make a it warp you, and change pallet...Tho. thats not important, i was just messing around....Whats important is whats the diffrences between Ontimer and Countdown?
Now there are 2 other important factors to this system, once the player kills that monster needed, it'll need to confirm if your a player so that the system doesn't get abused.
SO, heres what I need:
Once the NPC dialog appears and asks for the #, Which I wanted a Random colorized word number to appear(or somthing close) inside the Dialog box...and have it inputed next with-in 30 secs.
(i've looked for ways for this command line, and I seem to not be able to code it correctly...plz help)
Look at my coding to see what I'm talking about near the end, and also please confirm if this script resets once it's used also...
So in the end, Player walks into map > Player kills X'amount monster in Time> NPC talks to Player> Player Confirms #> Player Gets Prize. And if no one kills the monsters in that time it resets! Tah Dah! lol....<_< I hope you can help out more with this....Thanks!
/////////////////////////////////////////////
The Hidden Event System
by Mid-Knight
special mock up test version 1.0
/////////////////////////////////////////////
npc "prt_fild08" "PrizeNPC" HIDDEN_NPC 104 95 4 4 5
OnInit:
enablearena
return
OnStartArena:
disablenpc "PrizeNPC"
cmdothernpc "summon_1" "callmymob"
return
// --------------- method 1 ---------------
npc "prt_fild08" "summon_1" HIDDEN_NPC 104 95 4 4 5
OnCommand: "callmymob"
resetmymob
InitTimer
broadcastinmap "The Hunt will now start!"
OnTimer: 1000
broadcastinmap "The monsters will be spawned in 5 seconds."
return
OnTimer: 2000
broadcastinmap "You only have 1 minute for this test."
return
OnTimer: 3000
broadcastinmap "So be prepared to fight."
return
OnTimer: 6000
broadcastinmap "FIGHT!"
return
OnTimer: 60000
stoptimer
return
InitTimer
broadcastinmap "Wait."
return
OnTimer: 1000
broadcastinmap "The Hunt Shall Go On!"
return
OnTimer: 5000
stoptimer
enablenpc "PrizeNPC"
return
callmonster "prt_fild08" PORING "Poring" 100 100
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 101
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 102
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 103
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 104
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 105
//summon part
return
OnMyMobDead:
if npcv "summon_1" [VAR_MYMOBCOUNT] < 1
broadcastinmap "Clear."
stoptimer
dialog "[PrizeNPC]"
dialog "To claim your prize..."
dialog "Please input this number"
wait
changepallete 1 11
moveto "sec_pri" 23 66
close
enablenpc "PrizeNPC"
endif
return
EDIT:
Well i figured out the Random thing Color thing, and Inputing a Answer in thing....All was found in the niflheim_npc_ryu.sc
I'm editing it now and placing it together in my script.....Now the Next thing I need to know is the Timing the Dialog Box and the answer input....
This post has been edited by Mid-Knight: 24 October 2007 - 01:53 AM