Recommended Posts

this one ... Paskie sent me the topic link asked me to write so ...

http://rathena.org/board/topic/93022-random-pker/

I finished it...

 

Download 2.1

scuffle_event_2.1.txt

also needs source modification of -> getmemberaid

 

this is a twist to last man standing event

every few hours (configurable), this event will randomly select a few players

those players who are quick enough to type '@scuffle' will be able to join the event

then its a last man standing ... the last one who stay in the map gains the prize

 

the condition to pick the players for the registrations are : ( by default )

- not a vendor

- not in a chatroom

- not inside an event map (nowarp and nowarpto mapflag)

- not a GM

- active in last 30 seconds

- base level above 55

- no same ip

 

to configure the time, simply change

OnClock0000: // Configure time here ...OnClock0600:OnClock1200:OnClock1800:
.

.

 

 

version 1.0

scuffle_event_1.0.txt

 

this PvP event ... randomly select 2 active players and put them to fight in an empty map

the condition to pick that 2 players are : ( by default )

- not a vendor

- not in a chatroom

- not inside an event map (nowarp and nowarpto mapflag)

- not a GM

- active in last 30 seconds

- base level above 55

so the winner of the duel gain the prize

 

scuffle_event_2.0.txt

completely rewrite of this script,

now this script become more complex and using registration instead of sending them in straight

 

scuffle_event_2.1.txt

-- fix a bug that some players might be in the map, should mapwarp them out

 

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

nice idea, can't view the file atm so I want to ask :P will the player be warped to where he was before being recalled? would be nice if it act like this :) maybe add a config setting (warp players to 1: prontera , 2: savepoint, 3: source place (the place where they were before warped to event map))

Share this post


Link to post
Share on other sites

it warp to source place

 

... wonder why you can't read the script (just 89 lines without comments)

http://upaste.me/r/cec21097384776dc9

 

and the idea isn't mine ... I only make script accordingly to someone else idea

 

EDIT: forgot to add noreturn mapflag ... again

Edited by AnnieRuru

Share this post


Link to post
Share on other sites

Thanks a lot for this!

 

*edit

i wonder if you could add something that can ask players if they want to join the duel or not? in-case they were busy hunting something etc and then reroll the the next active player that might be interested to join.

Edited by Happy

Share this post


Link to post
Share on other sites

Is there a way to validate if you have an item in your inventory?

if ( !checkvending() && !checkchatting() && !getmapflag( strcharinfo(3), mf_nowarp ) && !getmapflag( strcharinfo(3), mf_nowarpto ) && !getmapflag( strcharinfo(3), mf_noteleport ) && !getgmlevel() && checkidle() < .idle && BaseLevel >= .level ) { // not vendor, not inside an event map and excluding GMs

imagine is here, but I do not know how to declare it.

-------------

 

ok i tried these (from wiki)
&& countitem(512) >= 5
and it seems to work >=)

Edited by Edgar

Share this post


Link to post
Share on other sites

just a suggestion, why not only pick at pvp room? so leveling up and mvp hunting won't pick.

just add
.. && getmapflag( strcharinfo(3), mf_pvp ) && ...
in the condition block

.

.

.

Request: please can you make it this event will not work if woe time or there is a current event....

shouldn't you configure the OnClock by yourself ?

OnTue2000 ... something like this also can

Share this post


Link to post
Share on other sites

 

 

just a suggestion, why not only pick at pvp room? so leveling up and mvp hunting won't pick.

just add
.. && getmapflag( strcharinfo(3), mf_pvp ) && ...
in the condition block

.

.

.

>Request: please can you make it this event will not work if woe time or there is a current event....

shouldn't you configure the OnClock by yourself ?

OnTue2000 ... something like this also can

 

 

Hello, AnnieRuru. How to restricted same ip to join this game?

Share this post


Link to post
Share on other sites

ahh ... I missed Happy's post

i wonder if you could add something that can ask players if they want to join the duel or not? in-case they were busy hunting something etc and then reroll the the next active player that might be interested to join.

that's a nice idea,

but instead of reroll, I made it a registration

 

@DarkPurple

block same ip right ? added it

 

release version 2.0

Share this post


Link to post
Share on other sites

 

ahh ... I missed Happy's post

i wonder if you could add something that can ask players if they want to join the duel or not? in-case they were busy hunting something etc and then reroll the the next active player that might be interested to join.

that's a nice idea,

but instead of reroll, I made it a registration

 

@DarkPurple

block same ip right ? added it

 

release version 2.0

 

also needs source modification of -> getmemberaid

 

oh no...it looks nice in version 2 but I am rathena user....

how can use addrid to instead getmemberaid or this getmemberaid can patch in rathena?

Edited by Darkpurple

Share this post


Link to post
Share on other sites

unfortunately ... rathena doesn't support getmemberaid because rathena still haven't break the 128 array limit

 

I just tried this in rAthena

prontera,162,180,5	script	asdf	100,{	[email protected][999] = 1;	dispbottom [email protected][999] +"";}
[Warning]: script:getelementofarray: index out of range (999)[Debug]: Data: variable name='[email protected]' index=0[Debug]: Source (NPC): asdf at prontera (162,180)
so ... no ... doesn't work for rathena

Share this post


Link to post
Share on other sites

unfortunately ... rathena doesn't support getmemberaid because rathena still haven't break the 128 array limitI just tried this in rAthena

prontera,162,180,5	script	asdf	100,{	[email protected][999] = 1;	dispbottom [email protected][999] +"";}
[Warning]: script:getelementofarray: index out of range (999)[Debug]: Data: variable name='[email protected]' index=0[Debug]: Source (NPC): asdf at prontera (162,180)
so ... no ... doesn't work for rathena

 

Okay…thanks for explained that…I think I need to back to use version 1 is better for me…

Share this post


Link to post
Share on other sites

Ofcourse I' used this script on my server bcoz Annie wrote this :D.
Anyway, I really dont know why sometimes the Winner in scuffle doesn't go back to his last position and the weird part is there are times that winners in scuffle is fixed to 1 CHARID even that char is not PART of the event.

Edited by Hadeszeus

Share this post


Link to post
Share on other sites

Ahhhh !

I made a stupid mistake

should make the map clean of players before the event start

 

version 2.1

clean the map from players using mapwarp .map$;

the weird part is there are times that winners in scuffle is fixed to 1 CHARID even that char is not PART of the event.

I don't really understand this part, can explain better ? Edited by AnnieRuru

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.   Paste as plain text instead

  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...