Jump to content

KirieZ

Core Developers
  • Content Count

    234
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by KirieZ

  1. Hello everybody, While doing some tests with the trader npc, I noticed that when I duplicate my trader, if I change the item list of one, all of them are affected. For example: - trader MyNpc#id -1,{OnInit: .@i = 400 + rand(0,10); sellitem Red_Potion, .@i; waitingroom "id: " + strnpcinfo(2) + " ; " + .@i, 0;end;}prontera,164,170,4 duplicate(MyNpc#id) MyNpc#1 101prontera,164,168,4 duplicate(MyNpc#id) MyNpc#2 101prontera,164,166,4 duplicate(MyNpc#id) MyNpc#3 101prontera,164,164,4 duplicate(MyNpc#id) MyNpc#4 101prontera,164,162,4 duplicate(MyNpc#id) MyNpc#5 101 This was a test to get 5 shops that sells the same thing but with different prices, but when testing, all of them have the same sell value (but the chat room is different). Is there a way to make each duplicate have a different item list? Thanks in advance.
  2. I might be wrong, but I think autobonus only triggers when attacking or being attacked: From docs/script_commands.txt: *autobonus <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};*autobonus2 <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};*autobonus3 <bonus script>,<rate>,<duration>,<skill id>,{<other script>};*autobonus3 <bonus script>,<rate>,<duration>,"<skill name>",{<other script>};What these commands do is 'attach' a script to the player which will getexecuted on attack (or when attacked in the case of autobonus2). If you want to have it being triggered when attacking, maybe you are not getting it triggered because the chance is very small (0,10% I think)? And your bonus heals 1 point of HP, maybe you are not noticing it From docs/item_bonus.txt bonus2 bHPRegenRate,n,x; Gain n HP every x milliseconds If you want to try a higher chance, I edited your script to test here: (It heals 1000 of HP, though I'm not sure about the rate, but is more frequent) autobonus "{ bonus2 bHPRegenRate,1000,10000; }",5000,10000,BF_MAGIC,"{ specialeffect2 EF_HEAL; }"; Sorry, but I can't help more than this because I've never used these commands
  3. Hello everybody, I would like to know if there is a way to make new constants for scripts, I tried to add some values to db/const.txt and they worked, but I'm not sure if it's good to do this haha. I thought about having a script that sets global variables ($@name and $@name$) inside a OnInit label too, but I'm not sure about the performance as the number of variables increases. So, is there any other way, or a better option between these two? Thanks in advance and sorry for english errors.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.