Jump to content
  • 0

[Request] Alive when die in pvp


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

can anyone give me a script in pvp when u die u will go @alive and when u kill u will get cash points

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

@Emistry

and for OnPCKillEvent

i not sure on this...what would happen if a players use self-damaging skills like Grand Cross ?

I was killed by myself. so killedrid = killerrid = me

- script PvPCasher -1,{
end;
OnPCKillEvent:
dispbottom "OnPCKillEvent:"+killedrid;
end;
OnPCDieEvent:
dispbottom "OnPCDieEvent:"+killerrid;
end;
}

http://i.imgur.com/EkS9v.jpg

>>

OnPCKillEvent:
if(killedrid==getcharid(3)||!killedrid)end;
set #CASHPOINTS,#CASHPOINTS + 2;
dispbottom "You have recieved 2 Cash Points for killing "+rid2name(killedrid)+".";
dispbottom "Your Balance is now: "+#CASHPOINTS;
set killedrid,0;
end;

Edited by goddameit
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:  

Something like this?

-    script    PvPCasher    -1,{
end;

OnPCKillEvent:
set #CASHPOINTS,#CASHPOINTS + 2;
dispbottom "You have recieved 2 Cash Points for killing "+rid2name(killedrid)+".";
dispbottom "Your Balance is now: "+#CASHPOINTS;
end;

OnPCDieEvent:
sleep2 1300;
if(killerrid != getcharid(3)) {
   warp strcharinfo(3),0,0;
   if(HP == 0) atcommand "@alive";
   percentheal 100,100;
} else warp "SavePoint",0,0;
end;
}

Change the amount of Cash Points after the "OnPCKillEvent" and also in the text :(.

Untested btw.

Regards,

Chris

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:  

i guess you should add in the map checking inside the script for the OnPCDieEvent part....

otherwise the player will using the @alive command upon killed by Monster

and for OnPCKillEvent

i not sure on this...what would happen if a players use self-damaging skills like Grand Cross ?

they could kill them self right ?

perhap they might get the Cash Point also ?

erm..if those above situation does exist..then you should add in more condition checking..

like check whether the killed users is the Killer Himself and check for is they inside the PVP map...

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:  

Also there's a problem where after a certain time, you'd be ported out of the PvP room automatically.

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:  

OnPCKillEvent:

As far as I understand the text in the script_commands.txt this event will only execute when an player kills an other player.

As for the OnPCDIeEvent Map Check

Mapflag check would be possible ^^.

if(getmapflag(strcharinfo(0),mf_pvp) == 0) end;

@Arcenciel:

I know about that, but as far as I have tested that, as long as the "sleep2" is not too long, you won't be warped outside

which would happen after you get killed 3 times ^^.

If I'm wrong with that, then I need to find a another way :(.

Regards,

Chris

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:  

remove this

/src/map/pc.c

		if( sd->pvp_point < 0 )
	{
		add_timer(tick+1000, pc_respawn_timer,sd->bl.id,0);
		return 1|8;
	}

then the auto respawn i guess it should be disabled by now...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

Maybe This Helps Need an Item for Resurection

- script Reviver -1,{
OnUsed:
menu "Resurection",Resu,"Cancel",Canceled;
Resu:
sleep2 200;
atcommand "@alive";
close;
Canceled:
message strcharinfo(0),"Ok Your Choice Master.";
getitem 501,1; //501 = red potion just test//Set ITEM ID for your Resurection Script
close;
}
- script Revived -1,{
end;
OnPCDieEvent:
if(countitem(501)<1) goto L_DHAVE; // ITEM CHECK IF HAVE TOKEN
if( strcharinfo(3) == "prontera" ) { // MAP DISABALER
message strcharinfo(0),"Cant Use In PVP MAPS";
close;
}
doevent "Reviver::OnUsed";
goto D_eleter;
close;
D_eleter:
message strcharinfo(0),"Resurection Stone Used";
delitem 501,1; //501 = red potion just test//Set ITEM ID for your Resurection Script
close;
L_DHAVE:
message strcharinfo(0),"You Dont Have Resurection Stone.";
close;
}

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