Jump to content
  • 0

"Script" error, sales price higher than the purchase price


maciel

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   3
  • Joined:  06/27/20
  • Last Seen:  

 

 

Boa tarde a todos, estou usando esse script "utility", ele contém vários itens "utilizáveis no jogo" estou recebendo erros conforme descrito nas linhas do emulador, já alterei para os preços que o emulador está sugerindo, mas os erros não somem. Vocês sabem como resolver isso para que o emulador fique sem erros e esse script rode perfeitamente?

prontera,145,187,5 loja Utilidades 506,607:1,610:1,523:1,525:1,605:1,506:1,606:1,678:1,12016:1,645:1,656:1,657:1,12031:1,12034:1,12030:1,120 32:1 ,12033:1,12028:1,12029:1,12117:1,12116:1,12114: 1,12115:1,717:1,716:1,715:1,1025:1,12119:1,12120:1,12118:1,12121:1,12045:1,12060:1,12055:1,12050:1,12065: 1.12070:1.714:1.1771:1.1010:1.1000:1.12220:1.1065:1

 

image.thumb.png.a9b3b09dacbd809b2583ab13fbf5eaec.png

utilidades_pvp.txt

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  446
  • Reputation:   30
  • Joined:  12/08/11
  • Last Seen:  

Each of the items sold by that NPC is priced at 1z. When a player sell any of these items, the price of the item, when no Sell price is declared in the database, is HALF the buy price declared.

#   Buy                     Buying price. When not specified, becomes double the sell price. (Default: 0)
#   Sell                    Selling price. When not specified, becomes half the buy price. (Default: 0)

Let's take Yggdrasil Berry as an example.

You have set your script to sell the berry like this

prontera,145,187,5 loja Utilidades 506,607:1

..now check the item_db_usable.yml, berry is declared like this

  - Id: 607
    AegisName: Yggdrasilberry
    Name: Yggdrasil Berry
    Type: Healing
    Buy: 5000
    Weight: 300
    Flags:
      BuyingStore: true
    Delay:
      Duration: 5000
      Status: Reuse_Limit_F
    Script: |
      percentheal 100,100;

Yggdrasil Berry has a default Buy value of 5000 and no Sell value. This means that when a player tries to sell the item, it will have a sell price of 2500z.

By selling it at 1z, this creates an opportunity for players to exploit them. They buy them at 1z and sell sell them back for 2500z. That's why the rAthena is warning you.

If you do intend of selling them for only 1z, you can set the Buy price to 1 and Sell to 0 for each of the item sold in the shop. But if you wish to sell them using their original price, set all prices in the script from :1 to :-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...