Jump to content
  • 0

How to activate Cashpoints in a server


Question

Posted

Good morning guys,

I have a script that adds a cash point when killing in a pvp room, but it doesnt add. I think the server is not earning cash points. Do i need to create a table to MySQL to activate it?

Thanks!

10 answers to this question

Recommended Posts

Posted

@Chickz: The variable is #CASHPOINTS. When you create scripts like those, though, you must be careful with additional checks to prevent abuse, ex. suicide/farming:

- script PCKill -1,{
OnPCKillEvent:
if (killedrid == getcharid(3)) end;
if (.NoFarm) {
 if (killedrid == @last_kill) end;
 set @last_kill, killedrid; }
for(set .@i,0; .@i<getarraysize(.maps$); set .@i,.@i+1)
 if (strcharinfo(3)==.Maps$[.@i]) {
  if (.Item) getitem .Item, 1;
  if (.Cash$ != "") {
setd .Cash$, getd(.Cash$)+1;
dispbottom "Gained a kill point! Total: "+getd(.Cash$); } }
end;
OnInit:
setarray .Maps$[0],"pvp_y_1-2","pvp_y_2-2","pvp_y_3-2";
set .NoFarm,1;	// End script for repeated kills? (1:yes / 0:no)
set .Item, 0;   // 0 to disable
set .Cash$, "#CASHPOINTS"; // "" to disable
end;
}

Posted

@Euphy

if (killedrid == getcharid(3)) end;

is it mean that if suicide than it wont give cashpoint/item?

e.g grand cross...

if (.NoFarm) {

if (killedrid == @last_kill) end;

set @last_kill, killedrid; }

this, if u kill 1 person twice or more, than the 2nd 3rd 4th kill will not count?

Posted

For SQL server : table `global_reg_value` - `str` = #CASHPOINTS

There is #cashpoint in may database but the ID is 0. I think my server doesnt save cash points.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...