Jump to content


  • Content Count

  • Avg. Content Per Day

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Kavaline

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. How I can get an item GID, or a similar unique variable? For healing item, or equipment, or misc item, anyone? And, is possible to change a script of an only one item? For example, all Apples recover 16~22 HP, but make only one Apple recover 7~10% SP without change all Apples or creating a new Apple? (Before anyone ask, I want the item GID for other purpose. Thinking about the item GID gave me this question, but I need the item GID to solve other problem).
  2. Works, I changed the attribute to aways get broken, and fit fine. "inventorylist" is very useful, you gave me some cool ideas. Thanks so much
  3. Hi, I need help for a script that break the players equipped weapon (not delete the player weapon, but breaks that return the weapon with broken status). I tried "delequip" with "getitem2", but how I get the slotted cards? And in case of BS/WS crafted weapons and signed weapons, have problem? And, have any way to do it better than: get weapon id; get refine; get card 1; get card 2; get card 3; get card 4; delequip; getitem2(weapon id, 1, 1, refine, 1, 0, card 1~4); Some item script, function, effect, etc, that I can use to do it better/easier?
  4. Thanks for the answers Works perfectly for what I want, because more than one player will activate the NPC. Thanks for the tip
  5. Hi, I want a script that gives the player 5 seconds to type a word, with 'input'. But when the time runs out, the script runs normally, and after, read the event label of the time out. Here is what I tried: mes "type anything in 5 seconds"; addtimer(5000, strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); input([email protected]); deltimer(strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); next; mes "you did it"; close; On5secs: mes "time over"; close; Maybe is impossible for the 'timer' force close the 'input', but at least, I want a way that after the 'input', run the time out label if the time out, without run the lines above of the script. How I can do it?
  6. Nope, is about source modification, to add a new custom parameter. But was alread done, ty
  7. Hi, someone can tell me where I edit the command "getiteminfo" to add a new option: "getiteminfo(<item ID>, ITEMINFO_CUSTOM)"?
  8. Sorry, I don't explain that is for script. I need do this in a NPC script, thanks for the shot
  9. I have a string var with the item name stored (a Jellopy, for example). How I get the ID of the Jellopy by their name, via NPC script? I need do this in this way, because the name that I get is dynamic, based on a long list of items. I want something like "getitemname(<item id>)", but moke like "getitemid(<item name>)", or a way to get it, without using "searchitem(<array name>, "<item name>")".
  10. I didn't knew this command, is very useful for debug and feedback, thanks for show me this. Have lots of commands that I don't know, but I'm learning. Slowy, but ok *shrug*
  11. @Start_ Not full working, same problem: after use one charge (the 5/5 charge), the NPC aways says "Next Charge in 10 seconds.", but now, the charge recover after the right time And, after the second use, he shows the right recharge time. I think that first use when in full charge dont update the .cont. But my idea is: in full charge, start the npctimer, that in this state, give the .count the right countdown time, and after one second, in the OnTimer, update for the player. But looks like he don't update using the 5/5 charge, to tell the player the right time, only after talking again, he update right, and I can't find why. @edit The most important is the timer count rightly, the time left message is for help me in debug, so, don't need fix this, because I will remove this showing message. Thanks for the help, the working code is that I need, and is functional. But, you can explain me why my timer dont start, but start with your edit? I want understand better what I did wrong, and don't repeat the same mistake.
  12. Hi, I write a script that a NPC have X charges (common for all players), and the players can spent a charge. After this, the NPC starts a timer (common for all players) to recharge, until their limit of X charges. Here is: - script TestScript::QuickTest 4_F_03,{ mes "[Quick Test]"; mes "What you want?"; next; switch(select("Use Charge", "See Charge", "Exit")) { case 1: if (.n_now > 0){ mes "[Quick Test]"; if (.n_now == .n_max) { setnpctimer 0; initnpctimer; mes "Starting recharges."; } .n_now -= 1; getitem 512, 1; mes "Done. Current Charges: "+.n_now+"/"+.n_max+"."; } else{ mes "[Quick Test]"; mes "No Charges."; } close; case 2: mes "[Quick Test]"; mes "Next Charge in "+((.cont)/1000)+" seconds."; close; } close; OnInit: set .n_max, 5; //max charges set .n_now, 5; //actual charge set .delay, 10*1000;//time to recover 1 charge set .cont, 0; //actual time left to recharge end; OnTimer1000: if (.cont <= 0) { .cont = .delay; } else{ .cont -= 1000; stopnpctimer; setnpctimer 0; if (.cont <= 0) { .n_now++; if (.n_now == .n_max) end; .cont = .delay; } initnpctimer; } end; } prontera,164,170,4 duplicate(QuickTest) Test Quick#prt 4_F_03 But I can't make the timer work; the NPC aways says "Next Charge in 10 seconds.", and the charges don't recover. I will appreciate if someone tell me were is the error, or another easier solution better than npctimer (I use 'OnTimer1000' because others NPCs will have different .delay's, so, I can use the same scope, and the 'addtimer' is attached to the player).
  13. I'm newbie in programming. I saw this post, but could't figure how to use, I got some errors, and by the time, I expected if another option was easier. Works like a charm, this example was very helpful. The brackets needs to be in "" too, because of this, I got wrong results. Solved question, can close the topic. Ty guys :)
  14. Hi, I need write this kind of script:  setarray .arrayAn[1], 1, 2, 3, 4, 5; setarray .arrayA$[1], "a", "b", "c", "d", "e"; setarray .arrayBn[1], 6, 7, 8, 9, 10, 11; setarray .arrayB$[1], "f", "g", "h", "i", "j", "k"; setarray .arrayCn[1], 12, 13, 14, 15; setarray .arrayC$[1], "l", "m", "n", "o"; [email protected] = rand(1,getarraysize(.arrayAn)); .resultn[1] = arrayAn[[email protected]]; .result$[1] = arrayA$[[email protected]]; [email protected] = rand(1,getarraysize(.arrayBn)); .resultn[2] = arrayBn[[email protected]]; .result$[2] = arrayB$[[email protected]]; [email protected] = rand(1,getarraysize(.arrayCn)); .resultn[3] = arrayCn[[email protected]]; .result$[3] = arrayC$[[email protected]]; Have any way to use matrix or other solution, doing something like this: setarray .arrayn[1][1], 1, 2, 3, 4, 5; setarray .array$[1][1], "a", "b", "c", "d", "e"; setarray .arrayn[2][1], 6, 7, 8, 9, 10, 11; setarray .array$[2][1], "f", "g", "h", "i", "j", "k"; setarray .arrayn[3][1], 12, 13, 14, 15; setarray .array$[3][1], "l", "m", "n", "o"; for ([email protected] = 1; [email protected] <= 3; [email protected]) { [email protected] = rand(1,getarraysize(.arrayn[[email protected]])); .resultn[[email protected]] = arrayn[[email protected]][[email protected]]; .result$[[email protected]] = array$[[email protected]][[email protected]]; } This is a script with testing values that I'm using to find a solution, my original script will needs 100 loops in this case (and will only use integers, for IDs and numbers, in non logical or consecutive order), and without matrix is really unfair. Have another option that help me?
  • Create New...

Important Information

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