Author Topic: FOnline Reloaded SDK how to spawn item with bonuses?  (Read 3100 times)

FOnline Reloaded SDK how to spawn item with bonuses?
« on: June 04, 2015, 11:27:55 am »
How to spawn item with bonuses?

Re: FOnline Reloaded SDK how to spawn item with bonuses?
« Reply #1 on: June 07, 2015, 03:26:53 pm »
Or other question: is even possible spaw bonus item via 'give command? Any help?

Offline Wipe

  • Rotator
  • Random is god
Re: FOnline Reloaded SDK how to spawn item with bonuses?
« Reply #2 on: June 07, 2015, 06:30:30 pm »
Bonuses are saved in item vals so you could use -v* argument of `spawnitem.

Item's Val0-Val4 holds bonus types, Val5-Val9 holds bonus value; if you want to set first bonus you have to set Val0 and Val5, so you use `spawnitem PID -v0 BONUS_ID -v5 BONUS_VALUE; for second bonus you use -v1 and -v6 and so on.
Some bonuses takes BONUS_VALUE as it is, while other only checks for non-zero value; see parameters.cpp for a list of bonuses IDs and logic behind them.

There is at least one bug introduced by Reloaded, connected with `spawnitem and item bonuses, but i'll leave discovering that to you ;)
Games are meant to be created, not played...