Vale Posted March 23, 2020 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 46 Reputation: 1 Joined: 03/16/20 Last Seen: March 25, 2021 Share Posted March 23, 2020 Hello, I would like to have a PVP Point on a specific map Ex: Map(prontera) In prontera if you kill a person - you will gain 2 points but not cashpoints [ for example: pvppoint ] then if you died you will lose 1 point there Also for PvP Point Shop... As I gathering Scripts - script PVPPOINTS -1,{ OnPCKillEvent: getmapxy.@map$,.@x,.@y,0; if(getcharid(3)==killedrid) end; if(.@map$ != "pvp_y_1-2") end; set .@player1, getcharid(3); set .@player2, killedrid; attachrid(.@player2); set .@player2points, #CASHPOINTS; if(.@player2points) { set #CASHPOINTS, #CASHPOINTS - 1; dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid); } attachrid(.@player1); if(.@player2points) { set #CASHPOINTS, #CASHPOINTS + 1; dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid); } else dispbottom "Sorry no cash points on the "+rid2name(killedrid); end; } This is all I can get, and it is in form of Cashpoints Thanks in advance ! Quote Link to comment Share on other sites More sharing options...
1 Patskie Posted March 23, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 3 hours ago Share Posted March 23, 2020 You can try below script and let me know if it works - shop PVPSHOP -1,501:20000 prontera,150,150,0 script PVP Points Shop 100,{ callshop "PVPSHOP", 1; npcshopattach "PVPSHOP"; end; OnBuyItem: for (.@j = 0; .@j < getarraysize(.items); .@j += 2) { for (.@k = 0; .@k < getarraysize(@bought_nameid); .@k++) { if (@bought_nameid[.@k] == .items[.@j]) { if (checkweight(@bought_nameid[.@k],@bought_quantity[.@k])) { if (#PVPPOINTS < .items[.@j+1] || #PVPPOINTS < (.items[.@j+1] * @bought_quantity[.@k])) dispbottom "You don't have enough PVP points"; else { #PVPPOINTS -= .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } // clean up before ending deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: setarray .items, 1000,1,1001,2; // Usage : <item id>,<price>{,<item id>,<price>} npcshopitem "PVPSHOP",0,0; for (.@i = 0; .@i < getarraysize(.items); .@i += 2) npcshopadditem "PVPSHOP", .items[.@i], .items[.@i+1]; end; } - script Func_PVP -1,{ OnPCKillEvent: if (getcharid(3) == killedrid || strcharinfo(3) != "prontera") end; #PVPPOINTS += .p[0]; dispbottom "You won " + .p[0] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnPCDieEvent: if (getcharid(3) == killerrid || strcharinfo(3) != "prontera") end; if (#PVPPOINTS > .p[1]) {#PVPPOINTS -= .p[1];} else {#PVPPOINTS = 0;} dispbottom "You lost " + .p[1] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnCheckPoint: dispbottom "You currently have " + #PVPPOINTS + " pvp points."; end; OnInit: setarray .p[0], 2, 1; // points per kill, points per death bindatcmd "checkpoints", strnpcinfo(0) + "::OnCheckPoint"; end; } Quote Link to comment Share on other sites More sharing options...
0 Vale Posted March 24, 2020 Group: Members Topic Count: 21 Topics Per Day: 0.01 Content Count: 46 Reputation: 1 Joined: 03/16/20 Last Seen: March 25, 2021 Author Share Posted March 24, 2020 (edited) 9 hours ago, Patskie said: You can try below script and let me know if it works - shop PVPSHOP -1,501:20000 prontera,150,150,0 script PVP Points Shop 100,{ callshop "PVPSHOP", 1; npcshopattach "PVPSHOP"; end; OnBuyItem: for (.@j = 0; .@j < getarraysize(.items); .@j += 2) { for (.@k = 0; .@k < getarraysize(@bought_nameid); .@k++) { if (@bought_nameid[.@k] == .items[.@j]) { if (checkweight(@bought_nameid[.@k],@bought_quantity[.@k])) { if (#PVPPOINTS < .items[.@j+1] || #PVPPOINTS < (.items[.@j+1] * @bought_quantity[.@k])) dispbottom "You don't have enough PVP points"; else { #PVPPOINTS -= .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } // clean up before ending deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: setarray .items, 1000,1,1001,2; // Usage : <item id>,<price>{,<item id>,<price>} npcshopitem "PVPSHOP",0,0; for (.@i = 0; .@i < getarraysize(.items); .@i += 2) npcshopadditem "PVPSHOP", .items[.@i], .items[.@i+1]; end; } - script Func_PVP -1,{ OnPCKillEvent: if (getcharid(3) == killedrid || strcharinfo(3) != "prontera") end; #PVPPOINTS += .p[0]; dispbottom "You won " + .p[0] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnPCDieEvent: if (getcharid(3) == killerrid || strcharinfo(3) != "prontera") end; if (#PVPPOINTS > .p[1]) {#PVPPOINTS -= .p[1];} else {#PVPPOINTS = 0;} dispbottom "You lost " + .p[1] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnCheckPoint: dispbottom "You currently have " + #PVPPOINTS + " pvp points."; end; OnInit: setarray .p[0], 2, 1; // points per kill, points per death bindatcmd "checkpoints", strnpcinfo(0) + "::OnCheckPoint"; end; } hello, is this based on prontera map only? Thanks ! It really works , i just edit the line "prontera" into my pvp map which is "arena_4" ! Edited March 24, 2020 by Vale Quote Link to comment Share on other sites More sharing options...
0 Yhaj Posted April 30, 2020 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 41 Reputation: 0 Joined: 05/04/18 Last Seen: October 10, 2020 Share Posted April 30, 2020 On 3/23/2020 at 10:22 PM, Patskie said: You can try below script and let me know if it works - shop PVPSHOP -1,501:20000 prontera,150,150,0 script PVP Points Shop 100,{ callshop "PVPSHOP", 1; npcshopattach "PVPSHOP"; end; OnBuyItem: for (.@j = 0; .@j < getarraysize(.items); .@j += 2) { for (.@k = 0; .@k < getarraysize(@bought_nameid); .@k++) { if (@bought_nameid[.@k] == .items[.@j]) { if (checkweight(@bought_nameid[.@k],@bought_quantity[.@k])) { if (#PVPPOINTS < .items[.@j+1] || #PVPPOINTS < (.items[.@j+1] * @bought_quantity[.@k])) dispbottom "You don't have enough PVP points"; else { #PVPPOINTS -= .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } // clean up before ending deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: setarray .items, 1000,1,1001,2; // Usage : <item id>,<price>{,<item id>,<price>} npcshopitem "PVPSHOP",0,0; for (.@i = 0; .@i < getarraysize(.items); .@i += 2) npcshopadditem "PVPSHOP", .items[.@i], .items[.@i+1]; end; } - script Func_PVP -1,{ OnPCKillEvent: if (getcharid(3) == killedrid || strcharinfo(3) != "prontera") end; #PVPPOINTS += .p[0]; dispbottom "You won " + .p[0] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnPCDieEvent: if (getcharid(3) == killerrid || strcharinfo(3) != "prontera") end; if (#PVPPOINTS > .p[1]) {#PVPPOINTS -= .p[1];} else {#PVPPOINTS = 0;} dispbottom "You lost " + .p[1] + " pvp points. New pvp points is " + #PVPPOINTS; end; OnCheckPoint: dispbottom "You currently have " + #PVPPOINTS + " pvp points."; end; OnInit: setarray .p[0], 2, 1; // points per kill, points per death bindatcmd "checkpoints", strnpcinfo(0) + "::OnCheckPoint"; end; } I would like to ask regarding this one, how to add maps? || strcharinfo(3) != "prontera" to? || strcharinfo(3) != "pvp_y_5-2" || strcharinfo(3) != "pvp_y_5-3")??? Quote Link to comment Share on other sites More sharing options...
Question
Vale
Hello, I would like to have a PVP Point on a specific map
Ex:
Map(prontera)
In prontera if you kill a person - you will gain 2 points but not cashpoints [ for example: pvppoint ]
then if you died you will lose 1 point there
Also for PvP Point Shop...
As I gathering Scripts
- script PVPPOINTS -1,{ OnPCKillEvent: getmapxy.@map$,.@x,.@y,0; if(getcharid(3)==killedrid) end; if(.@map$ != "pvp_y_1-2") end; set .@player1, getcharid(3); set .@player2, killedrid; attachrid(.@player2); set .@player2points, #CASHPOINTS; if(.@player2points) { set #CASHPOINTS, #CASHPOINTS - 1; dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid); } attachrid(.@player1); if(.@player2points) { set #CASHPOINTS, #CASHPOINTS + 1; dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid); } else dispbottom "Sorry no cash points on the "+rid2name(killedrid); end; }
This is all I can get, and it is in form of Cashpoints
Thanks in advance !
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.