diff options
author | mekolat <mekolat@gmail.com> | 2014-11-19 17:21:24 -0500 |
---|---|---|
committer | mekolat <mekolat@gmail.com> | 2014-11-24 20:56:59 -0500 |
commit | c2e75cb4955b00474f275e3ef5d3494d9fd68274 (patch) | |
tree | 4424fdb2e8a7de5d187423686daefafefbcb7034 /world/map/npc/009-7/rouge.txt | |
parent | a23d11f9299e27899486439a0dcfb0711c6fad24 (diff) | |
download | serverdata-c2e75cb4955b00474f275e3ef5d3494d9fd68274.tar.gz serverdata-c2e75cb4955b00474f275e3ef5d3494d9fd68274.tar.bz2 serverdata-c2e75cb4955b00474f275e3ef5d3494d9fd68274.tar.xz serverdata-c2e75cb4955b00474f275e3ef5d3494d9fd68274.zip |
sanguine vault => v0.5
Diffstat (limited to 'world/map/npc/009-7/rouge.txt')
-rw-r--r-- | world/map/npc/009-7/rouge.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/world/map/npc/009-7/rouge.txt b/world/map/npc/009-7/rouge.txt index c8c4dfaa..78491431 100644 --- a/world/map/npc/009-7/rouge.txt +++ b/world/map/npc/009-7/rouge.txt @@ -1,7 +1,7 @@ 009-7.gat,32,45,0|script|Rouge#Duels|181 { if (getgmlevel() >= 40 && getequipid(equip_head) == 647) goto L_CallDebug; -if (!debug && (strcharinfo(0) == "meko")) goto L_CallDebug; // allow meko to debug (has no dev cap) +if (!debug && (strcharinfo(0) == "meko") && (getequipid(equip_head) < 1)) goto L_CallDebug; // allow meko to debug (has no dev cap) goto L_Main; L_CallDebug: @@ -13,6 +13,7 @@ L_CallDebug: L_Main: set @requests, 0; if(@Duel_Queue$[0] != "") goto L_Queue; + if(@Duel_Queue$[1] != "") goto L_Decline; // if the user previously closed without declining we resume the procedure mes "[Rouge]"; mes "Welcome to the Sanguine Vault's duel arena."; if($SANGUINE & $@SV_FCDBit != 0) goto L_Disabled; @@ -24,10 +25,13 @@ L_Main: L_Queue: set @caster_name$, @Duel_Queue$[0]; + set @caster_time, @Duel_Queue[0]; set @target_name$, strcharinfo(0); set @target, getcharid(3, @caster_name$); set $@my_rid, getcharid(3); set @Duel_Queue$[0], ""; + set @Duel_Queue[0], 0; + if((gettimetick(2) - @caster_time) >= $@Duel_PlayerQueueTimeOut) goto L_Decline; if(attachrid(@target) != 1) goto L_Missing; if(getmap() != "009-7") goto L_Missing; if(attachrid($@my_rid) != 1) goto L_End; @@ -47,7 +51,9 @@ L_ShiftQueue: // here we shift the array to the left if((@Duel_Queue$[@loop] == "" ) && (@requests < 1)) goto L_Main; if(@Duel_Queue$[@loop] == "") goto L_End; set @Duel_Queue$[(@loop - 1)], @Duel_Queue$[@loop]; + set @Duel_Queue[(@loop - 1)], @Duel_Queue[@loop]; set @Duel_Queue$[@loop], ""; + set @Duel_Queue[@loop], 0; set @loop, (@loop + 1); if(@loop >= getarraysize(@Duel_Queue$)) goto L_Queue; goto L_ShiftQueue; @@ -68,12 +74,15 @@ L_Missing: L_Challenge: if($SANGUINE & $@SV_FCDBit != 0) goto L_Disabled; + set @ms, $@Duel_PlayerQueueTimeOut * 1000; + callfunc "HumanTime"; next; mes "[Rouge]"; mes "To challenge a player to a duel, you need to write this command:"; mes "%%E ##a"+ getspellinvocation("duel") +" (name)##0"; next; mes "Your opponent will have to talk to me to accept or decline your offer."; + mes "The request will expire ##2"+ @time$ +"##0 after being sent."; next; mes "Keep in mind that you can ignore incoming duel requests with this command:"; mes "%%E ##a"+ getspellinvocation("dueloff") +"##0"; |