Swordhunter
Member
Im trying to make my first script after learning a bit RGSS.
It's a woodcutting script and I need to know a few things;
1) How do I add an item (to add the wood logs)
2) When I did:
it gives me an error about the ">" and the "+", what I did wrong?
Here is the whole script if you need to see it:
It's a woodcutting script and I need to know a few things;
1) How do I add an item (to add the wood logs)
2) When I did:
Code:
if @wcexp >= 80
@wclvl += 1
Here is the whole script if you need to see it:
Code:
class Woodcutting
attr_accessor :wclvl
attr_accessor :wcexp
def initialize
@wclvl = 1 #The level
@wcexp = 0 #The exp
end
#--Leveling up--
if @wcexp >= 80
@wclvl += 1
p 'you leveled up at wc'
end
#--The system--
if wclvl <= 5
x = rand(100)
until x <= 30
p 'you got logs' #add logs
wcexp += 5
end
elsif wclvl <= 10
x = rand(100)
until x <= 40
p 'you got logs' #add logs
wcexp += 5
end
elsif wclvl <= 20
x = rand(100)
until x <= 50
p 'you got logs' #add logs
wcexp += 5
end
elsif wclvl <= 30
x = rand(100)
until x <= 60
p 'you got logs' #add logs
wcexp += 5
end
elsif wclvl <= 50
x = rand(100)
until x <= 70
p 'you got logs' #add logs
wcexp += 5
end
end
end