Jump to content
Sign in to follow this  
AnnieRuru

Last Man Standing (using queue iterator script commands)

Recommended Posts

Haru has fixed the queue iterator script commands

its time to spread out this technique

 

Download: 1.2

script

Make sure your hercules server is compile after 2015-12-21

errr ... maybe too strict xD

 

good for server owner and scripter alike

this can use in live server, and also can be a reference script for scripters

 

Next, might want to bump the battleground queue again xD

 

 

 

1.0

script

 

1.1

script

halt the script when the server is outdated

 

1.2

script

- change getmapxy type 1 into UNITTYPE_NPC

- change 0xFF0000 into C_RED

- change 0x190 into FW_BOLD, found in const.txt

- change the way to check your server using latest hercules ? just check with a constant

- add a configuration for .register_timer

 

 

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Haru has fixed the queue iterator script commands

its time to spread out this technique

 

Download: 1.0a

script

Make sure your hercules server is compile after 2015-11-15

 

good for server owner and scripter alike

this can use in live server, and also can be a reference script for scripters

 

Next, might want to bump the battleground queue again xD

thank u so much for this!!!

 

@@AnnieRuru

 

hello annieruru. i tested this on my test server , i changed the starting timer from 5 minutes to 3 seconds.

 

i created a 2 level novice (lvl 1 group id) (i also tried leveling them up and changing their job)

 

i started the event and registered them both.

 

there's a THIS IS SPARTAA so

i used one novice then i kill the other novice and nothing happened

 

there's no announcement when i killed the other novice and it's still @Pvpon

Edited by xlaws27

Share this post


Link to post
Share on other sites

a simple way to check is your hercules is up to date,

https://github.com/HerculesWS/Hercules/commit/367c806bccbf242c2025356777b4cf1d194c481a

is the new queue iterator script commands uses QUEUEOPT_DEATH

 

if your test server's dbconst.txt is HQO_OnDeath, then you can't use this script

 

release version 1.1

to make sure your server is updated.

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Another great release from Annie , thank you! Testing it right now :)

 

Edit: Worked thank you.

 

Edit 2:

 

I have a problem now, I set the time only for

OnClock0730:
OnClock1100:
OnClock1430:
OnClock1800:
OnClock2020:
OnClock2350:
 
but seems the event starting randomly , I don't know why, any suggestion? It's 3 AM here, and the event started like 10 times already from 1AM to 3 AM.
 
And a little suggestion, 5 minutes is too long and without announce for 4-1 minutes players thought the event is error / over. ( I know how to edit it just suggestion )
Edited by Max

Share this post


Link to post
Share on other sites

but seems the event starting randomly , I don't know why, any suggestion? It's 3 AM here, and the event started like 10 times already from 1AM to 3 AM.

maybe some GM spam it ?

try comment this line

//bindatcmd "lms", strnpcinfo(0)+"::OnStart", 99,100;
so GM can't start this event

.

.

And a little suggestion, 5 minutes is too long and without announce for 4-1 minutes players thought the event is error / over. ( I know how to edit it just suggestion )

ok, the registration timer is now configurable

 

1.2

http://upaste.me/eea72228293b40363

- change getmapxy type 1 into UNITTYPE_NPC, Haru just merge my pull request yesterday -> link

- change 0xFF0000 into C_RED, Haru also just merge my pull request today -> link

- change 0x190 into FW_BOLD, found in const.txt

- change the way to check your server using latest hercules ? just check with a constant

- add a configuration for .register_timer

Share this post


Link to post
Share on other sites

I modified the script. Might be the problem.

if ( getgmlevel() >= 80 ) { // gm level to bypass the registration		mes "start the event ?";		next;		if ( select( "Yes", "No" ) == 2 ) close;		donpcevent strnpcinfo(0)+"::OnStart";		warp .eventmap$, 0,0;		end;	}

And I just realized you did put bindatcmd to start the event, my bad then.

 

 

On your new version 1.2

OnStart:OnMinute00://OnClock0000: // put all your start timer here

Isn't it supposed to be like this ?

//OnClock0000: // put all your start timer hereOnStart:OnMinute00:

CMIIW

Edited by Max

Share this post


Link to post
Share on other sites

I modified the script. Might be the problem.

if ( getgmlevel() >= 80 ) { // gm level to bypass the registration		mes "start the event ?";		next;		if ( select( "Yes", "No" ) == 2 ) close;		donpcevent strnpcinfo(0)+"::OnStart";		warp .eventmap$, 0,0;		end;	}
And I just realized you did put bindatcmd to start the event, my bad then.

 

 

I think you misunderstood that behavior

it was reported in this topic -> http://herc.ws/board/topic/11010-run-or-die-event-aka-poring-bomb/?p=65606 <- I need to update that script later

.

.

.

On your new version 1.2

OnStart:OnMinute00://OnClock0000: // put all your start timer here
Isn't it supposed to be like this ?
//OnClock0000: // put all your start timer hereOnStart:OnMinute00:

 

 

doesn't matter

label always read through all labels as long as there is no end; command

Share this post


Link to post
Share on other sites

 

I modified the script. Might be the problem.

if ( getgmlevel() >= 80 ) { // gm level to bypass the registration		mes "start the event ?";		next;		if ( select( "Yes", "No" ) == 2 ) close;		donpcevent strnpcinfo(0)+"::OnStart";		warp .eventmap$, 0,0;		end;	}
And I just realized you did put bindatcmd to start the event, my bad then.

 

I think you misunderstood that behavior

it was reported in this topic -> http://herc.ws/board/topic/11010-run-or-die-event-aka-poring-bomb/?p=65606 <- I need to update that script later

.

.

.

On your new version 1.2

OnStart:OnMinute00://OnClock0000: // put all your start timer here
Isn't it supposed to be like this ?
//OnClock0000: // put all your start timer hereOnStart:OnMinute00:
doesn't matter

label always read through all labels as long as there is no end; command

 

 

Annie im using your latest script, but still event starting on random timer. It's 9 am now and it's starting, my script start from 11 am.

Share this post


Link to post
Share on other sites

@@Max

 

using VPS? use @time in game to see the server time

 

yes , I know. server time is the same like my time.

Edited by Max

Share this post


Link to post
Share on other sites

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Source (NPC): LMS at mellina (63,75)

 

lms was working a last week

i got this error yesterday.

the only thing that i changed was the map.

Share this post


Link to post
Share on other sites

 

 

nonono ...

the script_rid2sd function has script->reportfunc(st) command

TBL_PC *script_rid2sd(struct script_state *st) {	TBL_PC *sd;	if( !( sd = map->id2sd(st->rid) ) ) {		ShowError("script_rid2sd: fatal error ! player not attached!n");		script->reportfunc(st);		script->reportsrc(st);		st->state = END;	}	return sd;}
it should print error like this
[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: set (2 parameters):[Debug]: Data: variable name='asdf' index=0[Debug]: Data: number value=1[Debug]: Source (NPC): kjdhsfsjhf at prontera (155,185)
[Error]: script_rid2sd: fatal error ! player not attached![Debug]: Function: announce (3 parameters):[Debug]: Data: string value="asdasdsa"[Debug]: Data: number value=0[Debug]: Data: variable name='C_REDa' index=0[Debug]: Source (NPC): kjdhsfsjhf at prontera (155,185)
if your server doesn't tell which command it came from, I seriously wonder what kind of server you are running ...

 

Edited, tested this

prontera,155,185,5	script	kjdhsfsjhf	1_F_MARIA,{	detachrid;	if ( C_REDa != 1 );}
yeah if it doesn't run a function ...

 

yes, try comment this line

if ( C_RED != 0xFF0000 ) end;
if your server runs fine comment this line, you have to update your server to use this script Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Hello Ms. @@AnnieRuru

Help me with this error:

[Warning]: script_hqueue_remove: unknown queue id 7 (used with var 2000328)
[Warning]: buildin_queuesize: unknown queue id 7
[Debug]: Source (NPC): Last Man Standing at prontera (155,178)
[Warning]: script_hqueue_remove: unknown queue id 7 (used with var 2000330)
[Warning]: buildin_queuesize: unknown queue id 7
[Debug]: Source (NPC): Last Man Standing at prontera (155,178)
[Warning]: script_hqueue_remove: unknown queue id 7 (used with var 2000328)
[Warning]: buildin_queuesize: unknown queue id 7
[Debug]: Source (NPC): Last Man Standing at prontera (155,178)
[Warning]: script_hqueue_remove: unknown queue id 7 (used with var 2000330)
[Warning]: buildin_queuesize: unknown queue id 7
[Debug]: Source (NPC): Last Man Standing at prontera (155,178)
                                                               
Edited by MikZ

Share this post


Link to post
Share on other sites

Senpai, script needs more checks on OnDeath and OnQuit, cause if someone dies or quits while the event haven't started, when
 

if ( queuesize(.qid) == 1 )

returns... true, event ends and last remaining character wins

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.