and those buffs work for the pet? o_O
i thought that regular buffs can't be used on pets
and why did you keep restoreHpMp? it doesn't work for the pet in any way...
and just for your information, I would do it this way:
I would make a function to save space and later on I would call it, or even better, to not to mess with "if event== and so on", I would make an array where I would store all buff data, so the code would be much more smaller in size...
here's how it would look like:
# buff data is stored in this way: id, level, html file name (without .htm) assuming that every value is an integer value
buff_data = [[1085,3,1],[1304,3,2],[1087,3,3]] # only a part of the buff list
# function to cast the buff
def castBuff(id,level,htmlNum) :
SkillTable.getInstance().getInfo(id,level).getEffects(st.getPlayer(),st.getPet(),st.getPlayer(),st.getPet())
return str(htmlNum)+".htm"
and all you would have to do to make the buff casting work depending on the event number is:
castBuff(buff_data[event][0],buff_data[event][1],buff_data[event][2])
or you can do it without the custom function, so it would look like this:
SkillTable.getInstance().getInfo(buff_data[event][0],buff_data[event][1]).getEffects(st.getPlayer(),st.getPet(),st.getPlayer(),st.getPet())
return str(buff_data[event][2])+".htm"
if you understood everything, try to make the next version to be like this, or if you will have problems, write here and I will make it working properly
btw: it can be done more clearly with dictionaries, and if I will remember how to use them, I will write the second way using dictionaries not arrays