working on a script atm.
but I wane know how I can add a number to the cost of an item
the reason for this is because the database is limited to max 99999G for an item.
I want to increase this by adding for example 100000G so the item would cost 199999G in a shop
how can I do this true a script?
$data_items[x].price += price
that would add but if you just want to set it do this
$data_items[x].price = price
nvm.. just found out that your Equipment Stat Breaker works like a dream for this :P
(is the code you just linked up)
EDIT: (new problem)
I know how I can add new prices etc.. but it would require the user of the script to add loads of lines somewhere middle in the script.
is it possible for example to link it to a configuration part of the script
for example.
somewhere in a script I have:
$data_items[x].price = y
x = my_script_config::x_price
y = my_script_config::y_price
and than in my configuration of my script:
config something[x,y]{
[1,100],
[2,200]
[etc,etc]}
it is possible... just can't figure out how to do it with my limited scripting knowledge.
use it like this or something
class RPG::Item
def price
case @id
when 1 then return 100
end
return 10
end
end
yeah.. that should work.
but how do I change the weapon price and the armor price than?
Here you go
module RPG
class Item
def price
case @id
when 1 then return 100
end
return @price
end
end
class Weapon
def price
case @id
when 1 then return 100
end
return @price
end
end
class Armor
def price
case @id
when 1 then return 100
end
return @price
end
end
end