Jump to content
  • 0

R> Custom WoE Salary from database


CyanZoldyck

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  01/09/21
  • Last Seen:  

Hello! I need help. I am using Euphy's WOE Controller script. I have this customization on where I am counting total of Silver Coins farmed from my fishing system to be uploaded in database. Count total of silver coins got in fishing per week and upload it in database

 

Now, I want this silver coins to be added in WoE salary in this computation: Total of Silver Coins farmed in the whole server*5/100

 

woe_controller.txt

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  01/09/21
  • Last Seen:  

Hi, Can someone help me with this?

Here's the WOE rewards:

	// Rewards per castle.
	//   setarray .reward_id[0],     <itemID>{,<itemID>,...}
	//   setarray .reward_amount[0], <amount>{,<amount>,...}
	setarray .reward_id[0],30202,12103;
	setarray .reward_amount[0],50,5;

Here's my database table. I want to SUM the points column and then put that points added into WOE salary rewards into the ItemID 30202 in this computation. Total SUM of points * 5 / 100

image.png.d8a7056dc51e2f9ac9c1b6039377275c.png

Hi rAthena community, any luck with this? /sob

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  01/09/21
  • Last Seen:  

Anyone can help me with this? Thanks!

Link to comment
Share on other sites

  • 0

  • Group:  Donators
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   2
  • Joined:  10/31/12
  • Last Seen:  

Total Silver Coin Farmed in the whole server?

query_sql("SELECT SUM(points) FROM table_name",.@sumpoints); // This would add all the points in the server or you could modify this to sum/add all silver coined farmed in the server like if its in inventory it should be 

query_sql("SELECT COUNT(*) FROM inventory WHERE item_id = silver_coin_item_id",.@total_silver_coined_farmed);

so it should be

set .@total,(.@total_silver_coined_farmed * 5) / 100; 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  01/09/21
  • Last Seen:  

The query worked thank you! Can you teach me how can I add it as WoE reward?

set .@total,(.@total_silver_coined_farmed * 5) / 100; 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  01/09/21
  • Last Seen:  

bump. Anyone? Thank you!

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