Jump to content
  • 0

need help on this event script


kelvin

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  07/14/13
  • Last Seen:  

gonryun,158,114,5    script    Pvp Event   884,{
if( Class == Job_Novice ){ mes "Novice cant join."; close; }
    mes "[ Pvp Event ]";
    mes "Hi " + strcharinfo(0) + ", What can I do for you?";
    next;
    mes "-----^008000Pvp Event MAP INFO^000000----";
    mes "There are currently [^008800"+getmapusers("pvp_n_1-5")+"^000000] players on map";
    next;
    menu "Register",-,"What is Pvp Event?",what,"Leave",leave;
    next;
    mes "[Pvp Event]";
    .@myaid = getcharid(3);
    while( .@i < .size_reg && .reg_aid[.@i] != .@myaid ) .@i++;
    if ( .@i == .size_reg ) {
        .@ip$ = getcharip();
        while( .@j < .size_reg && .reg_ip$[.@j] != .@ip$ ) .@j++;
        if ( .@j == .size_reg ) {
            .reg_aid[ .size_reg ] = .@myaid;
            .reg_ip$[ .size_reg ] = .@ip$;
            .size_reg++;
        }
        else {
            mes "^FF0000Sorry there is someone with the same ip in this event.^000000";
            close;
        }
    }
    mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!";
    warp "pvp_n_1-5",0,0;
    end;

 

Can someone help me make this script that can show player name with same ip is in this event.

Edited by Patskie
Change to code
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

mes "^FF0000Sorry, "+ rid2name( .reg_aid[.@j] ) +" which is same ip with you has joinned this event.^000000";

assuming the script delete the var when the player log out

 

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I don't understand what you request. The current npc doesn't warp the player if someone with the same ip already enter.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  07/14/13
  • Last Seen:  

mes "^FF0000Sorry there is someone with the same ip in this event.^000000"

 

this only says that someone already in the event. possible to make it show the player name with same ip in that statement? 

 

example: mes "^FF0000Sorry, GMxxx which is same ip with you has joinned this event.^000000"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  07/14/13
  • Last Seen:  

thanks Capuche

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