Jump to content
  • 0

Creating a ladder


Zac

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Hello, I need to create a ladder of my own community-ish gameplay.

The game is where peoples will earn Kill Points each time he/she killed another players inside an arena.

What I want to ask for help is, how to create a ladder of Kill Points? do it needs an SQL related script?

and for OnPCKillEvent, can I make it just active in a map?

Whoever who would love to help, you're free to make an example of script part.

Regards ~ ♥

Edited by Zac
Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

There's already some existing scripts that does this. You might want to check them out.

http://rathena.org/b...-ultimate-v130/

http://rathena.org/board/files/file/626-pvp-ladder-173/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Thanks again Arcenciel. By the way, how about the OnPCKillEvent?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

You'd have to utilize getmapxy and then an if statement to check if the map the player is on is the map you want the script to work in.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Wouldn't be

strcharinfo(3)

more easier to use?

Since it's the same thing except it only returns the map name ^^.

*strcharinfo(<type>)

This function will return either the name, party name or guild name for the

invoking character. Whatever it returns is determined by type.

0 - Character's name.

1 - The name of the party they're in if any.

2 - The name of the guild they're in if any.

3 - The name of the map the character is in.

Regards,

Chris

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Arcenciel.

Damn, I need 1 minute to understand your helpful words without commas. /ok

So its like.

When the quest started.
set #a,1;
When the quest is running.
OnPCKillEvent:
if (#gladmember==1){
if (getmapxy("rwc01",0,0,0,strcharinfo(0))
{
set #killpoint,#killpoint+1;
dispbottom "You has killed another gladiator! your kill point is "+#killpoint+".";
}
if (getmapxy("rwc02",0,0,0,strcharinfo(0))
{
set #killpoint,#killpoint+1;
dispbottom "You has killed another gladiator! your kill point is "+#killpoint+".";
}
if (getmapxy("rwc03",0,0,0,strcharinfo(0))
{
set #killpoint,#killpoint+1;
dispbottom "You has killed another gladiator! your kill point is "+#killpoint+".";
}
end;
}

Chris.

Do you mean like this one? if yes, indeed its a lot easier, thanks.

set @gladmap,strcharinfo(3);

if (@gladmap=="rwc01"){ blabla }

Edited by Zac
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Wouldn't be

strcharinfo(3)

more easier to use?

Since it's the same thing except it only returns the map name ^^.

Eh, first thing that came to mind was getmapxy. =P

Arcenciel.

Damn, I need 1 minute to understand your helpful words without commas. /ok

Chris.

Do you mean.

set @gladmap,strcharinfo(3);

if (@gladmap==rwc01){ blabla }

Don't think it needed a comma anywhere. Just read it more slowly and it'll make sense.

Your script in the codebox doesn't look right. Read the documentation for getmapxy. If you're just gonna follow Chris, all you need is:

if (strcharinfo(3) == "map name here" ) {
Script here
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Yea It was the blabla version of the script ._.

Alright, I think that will solve everything, thanks Arcenciel & Crish /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   15
  • Joined:  01/08/12
  • Last Seen:  

How about sharing your complete ladder version to all.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Well, I'd like to share it soon whenever I finished it e_e. Don't worry I'm not greedy.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

well,...both getmapxy and strcharinfo(3) has it own uses...

For example...

getmapxy

1. usually used by alot users to determine the mapname..
2. when you want the script to work in certain cells of the map because it can return the coordinate of your current char located
3. Use to search someone ( Player / NPC) across the server

strcharinfo(3)

this command only work in return you a mapname..
it wont work when you want the script only work in certain cell unless you add in other cell checking..


So, for me i would use strcharinfo(3)..xD

because it is shorter and easier to remember ....hahaha

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   4
  • Joined:  01/25/12
  • Last Seen:  

Yes, because I'm using it for an arena that means it doesn't need certain cell x y. by the way thanks, now I'm testing it and going to release it soon.

Link to comment
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
Answer this question...

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

×
×
  • Create New...