Jump to content
  • 0

Points system


iSkiddo

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

// Newbie gift for OthelloRO by Lolzy supported by iskiddo
// http://lolzy.net/ro_dev/othelloro
lhz_in03,258,266,4 script Newbie Gift 710,{
if(##newbiegift==0){

 mes "^666666[ Newbie Gift ]";
 mes "^000000Welcome!";
 mes "Here are some start cash for you.";
 mes "Have fun!";
 next;
 close2;
 atcommand "@cash 250";
 warp "ra_temple" ,119,149;
 savepoint "ra_temple",119,149;
set ##newbiegift,1;
} else {

 mes "^666666[ Newbie Gift ]";
 mes "^000000You already got your gift.";
 next;
 warp "ra_temple" ,119,149;
 savepoint "ra_temple",119,149;
 close;

}
}

Hi there . i need help on my point system .

why when player relogin or logout , the points will be gone . or can say start to 0 again . any ideas ?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Your variable is wrong

Read about it here:

http://rathena.org/w...iables_and_goto

or Chapter Two of these series:

http://rathena.org/b...ng-for-dummies/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

I have never tinkered with global account vars...

please try to see if #newbiegift works

Your variable is wrong

Read about it here:

http://rathena.org/w...iables_and_goto

or Chapter Two of these series:

http://rathena.org/b...ng-for-dummies/

the variable is not wrong, it's a global account variable... (usually only used when you have multiple map servers...) don't know if they work, if you don't...

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:  

I assumed it wouldn't. =/

Try out Z3R0 suggestion.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

actually the script is working .. the problem is .. when player gain those cash .. after they relogin , all those cash gone ? .. any ideas ?

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:  

I'm not sure if this affects your script in anyway..but are you using TXT or SQL?

Some things just don't work with TXT like for example the mail and the mercenary system. I'm not sure if cash points are one of them.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

well Thanks for helping guys . i figured this out already ..

its because i wrongly place #CashPoints . its should be #CASHPOINTS

on

//===== eAthena Script =======================================
//= Cash Points Giver (Login)
//===== By: ==================================================
//= azsx123
//===== Current Version: =====================================
//= 1.2
//===== Compatible With: =====================================
//= eAthena SVN
//= 3CeAM
//===== Description: =========================================
//= Gives Cash Points to a player when he logs-in.
//= Cash Points New Accounts
//= Cash Points once a day after 1st login.
//= Bonus for every 7 consecutive days that the player login
//===== Additional Comments: =================================
//= 1.0 Initial Release
//= 1.1 Bonus for every 7 consecutive days
//= 1.2 Easier to Configure
//	  Bonus can now be turned off 
//===== Credits: =============================================
//= Cruxiaer for "once a day" feature
//= azsx123 for the script
//============================================================
- script PointsGiver -1,{
OnPCLoginEvent:
set .DGName$,"[server]"; // NPC Name
set .DGFirst,10;		 // Amount of Cashpoints for first login
set .DGDaily,1;		  // Amount of Cash Points on per day basis
set .DGBonus,1;		  // Turns bonus feature on:1 / off:2. (Default: 1)
set .DGBonAm,5;		  // Amount of Cash Cash Points for consecutive Login
if (#FirstLog == 1) goto DailyGift;
mes .DGName$;
mes "Welcome to OthelloRO!";
mes "Here is " +.DGFirst+" Cash Points to help";
mes "get you started for your adventures!";
dispbottom .DGFirst +" Cash Points Received!";
set #CashPoints,#Cashpoints+.DGFirst;
set #FirstLog, 1;
set #DGNPC, (gettime(6)*31)+gettime(5);
set .delay, gettimetick(2);
close;
DailyGift:
set @now, (gettime(6)*31)+gettime(5);
set @delay, (gettimetick(2) - .delay);
set @day, @now - #DGNPC;
if(@day>1)
{
if (#DailyLog >= 6) goto ConSecBonus;

 set #DailyLog,#DailyLog+1;
 mes .DGName;
 mes "Good day!";
 mes "Here is a gift for visiting us today!";
 set #CashPoints,#Cashpoints+.DGDaily;
 dispbottom .DGDaily+ " Cash Points Received!";
 set #DGNPC, (gettime(6)*31)+gettime(5);
 set .delay, gettimetick(2);
 set #DailyLog,#DailyLog+1;
 close;
}
close;
if (.DGBonus == 1)
{
ConSecBonus:
mes .DGName$;
mes "Congratulations! You have logged-in for 7 days in a row!";
next;
mes .DGName$;
mes "Here is a "+.DGBonAm+" Cash Point bonus and you daily bonus of "+.DGDaily+" Cash Points!";
set .total,.DGBonAm+.DGDaily;
set #CashPoints,#CashPoints+.total;
set #DailyLog,0;
dispbottom .total+" Cash Points Received!";
close;
}
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

I'm really confused, because that's not even close to the same script you asked for support on O.o

  • Upvote 1
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...