Jump to content
  • 0

Save ID script command


uDe

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Hello guys..

 

May I request a sql command to save Players info into sql table (create new table) after they received items from NPC?

 

Example of SQL table :

 

- Char ID

- Account ID

- Item

- Time

- Date

- Map

 

I'm using eAthena 3ceAM

Edited by uDe
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

 

An internal error occurred. Please contact an administrator

Need Help?

 

Let me see first..

Seems like I can't understand sql query very well.. Can you please help me with this?

Edited by uDe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

GM rewards a player > player receives item > script logs the transaction in evt_prize table

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

/*
CREATE TABLE reward_backup
(
char_id varchar(255),
acc_id varchar(255),
item_id varchar(255),
amount varchar(255),
time varchar(255),
map varchar(255)
);
*/

map,x,y,4	script	reward_backup	111,{

.....
.....
.....
set .@Rew_CharID$,getcharid(0);
set .@Rew_AccID$,getcharid(3);
set .@Rew_ITEM??$;
set .@Rew_ITEMAMOUNT$??;
set .@Rew_Time$,gettimestr("%Y-%m/%d %H:%M:%S",21);
set .@Rew_Map$,getmap??;
query_sql "INSERT INTO `reward_backup` VALUES('"+@Rew_CharID$"','"+@Rew_AccID$+"','"+.@Rew_ITEM?$+"','"+@Rew_ITEMAMOUNT$?$+"','"+.@Rew_Time$+"','"+.@Rew_Map$+"')";
getitem 11111,10;
close;
}

Like this? I want to combine it with my personal WoE Reward script. I'm so sorry for not share the whole WOE Reward Script. I can't do that..

But, I had give some example like above..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

yep, it should work properly. make sure to backup!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

yep, it should work properly. make sure to backup!

I don't know what to use for item, item amount and map variable..

For item, there's 3 different item will be given according the woe day.. Sunday item id is 11111, Wednesday item id is 11112 and Saturday item id is 11113. Amount of item is 1. For map, it should be new_zone02.

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