Jump to content
  • 0

Need to learn how this script is done.


KoRRuPT

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  01/13/12
  • Last Seen:  

I have a bigger plan on this script but I just need to know a crucial part of it.

The segment I need to know is how to do the following:

  1. Warping a player to a said map
  2. Spawning 3 evil clones
  3. If player dies, clones are killed, player can attempt again at step 1
  4. If clones die, player is warpped back

What I am basically lost at is how to keep track of the player dieing and restarting, along with clones dieing and finishing the quest. Also what is the mobid of a evil clone.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


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

try this

prontera,155,181,5 script Sample 757,{
mes "Go kill Evil Clone ?";
if( select( "Yes:No" ) == 2 ) close;
warp "guild-vs5",0,0;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == "guild_vs5" ){
for( set .@i,0; .@i < 3; set .@i,.@i + 1 ){
 clone "guild_vs5",0,0,strnpcinfo(0)+"::OnCloneDie",getcharid(0);
}
}
end;
OnPCLogoutEvent:
OnPCDieEvent:
OnCloneDie:
if( strcharinfo(3) == "guild_vs5" ){
killmonster "guild_vs5","All";
mapwarp "guild_vs5","prontera",0,0;
}
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  01/13/12
  • Last Seen:  

I tested this and the result was that the clones do not spawn.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

little mistake in your script Emistry :

at line 4 :

warp "guild-vs5",0,0;

should be

warp "guild_vs5",0,0;

Edited by Loup
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  01/13/12
  • Last Seen:  

I already fixed that myself and the script still does not work. For some reason the "OnPCLoadMapEvent: " seems to not activate.

Edit: Figured it out, remove the "end;" from the start of the script as it disconnects the OnPCLoadMapEvent from the player.

prontera,155,181,5 script Sample 757,{
mes "Go kill Evil Clone ?";
if( select( "Yes:No" ) == 2 ) close;
warp "guild_vs5",0,0;

OnPCLoadMapEvent:
if( strcharinfo(3) == "guild_vs5" ){
for( set .@i,0; .@i < 3; set .@i,.@i + 1 ){
 clone "guild_vs5",0,0,strnpcinfo(0)+"::OnCloneDie",getcharid(0);
}
}
end;
OnPCLogoutEvent:
OnPCDieEvent:
OnCloneDie:
if( strcharinfo(3) == "guild_vs5" ){
killmonster "guild_vs5","All";
mapwarp "guild_vs5","prontera",0,0;
}
end;
}

Edited by KoRRuPT
Link to comment
Share on other sites


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

erm....about the OnPCLoadMapEvent..

there is suppose a mapflag for loadevent..

perhap i missed that part during i copy and paste the script here..

guild_vs5    mapflag    loadevent

loadevent will enable the OnPCLoadMapEvent bring triggered upon loaded at the specific map

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