Jump to content

skyleo

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by skyleo

  1. Please post you're edited script. EDIT: yeah, I made a little mistake: if(countitem(25003) && getgmlevel() < 99) { mes "You don't have a GM Allowance."; close; }this is wrong change it to this:if(!countitem(25003) && getgmlevel() < 99) { mes "You don't have a GM Allowance."; close; }And here the final menu line:switch(select( (getgmlevel() != 99 "I have a GM's Approval Card" : "") +(getgmlevel() < 99 ? "" : ":Guild List") )) {
  2. Are you sure that you're syntax of your for()-loop is right?
  3. Just add this before the switch: if(countitem(25003) && getgmlevel() < 99) { mes "You don't have a GM Allowance."; close; } This counts for all people who have a lesser gm level then 99. Also I made a little mistake at this part: switch(select( ((countitem(25003) || getgmlevel() == 99 ) ?"I have a GM's Approval Card":"") + ":Guild List")) { This would mean that if he has the allowance card it would show "I have a GM's Approval Card" or if he is GM Level 99, but you wanted it to be not shown for GMs level 99, so it should be like this: switch(select( ((countitem(25003) && getgmlevel() != 99 ) ?"I have a GM's Approval Card":"") + ":Guild List")) { Since you want that a GM Level 99 can see only the Guild List.
  4. nope, "status ->def2 +=" means that the following value is being added to the def. so adding the value of your vit multiplied with 2 means that you have 1 vit = 2 def, you have to devide it, just like in the renewal formula.
  5. So you want that players can't access the NPC completely if they don't have any GM allowance?
  6. it's in src/map/status.csearch for this line: status->def2 += (int)(((float)level + status->vit)/2 + ((float)status->agi/5)); //base level + (every 2 vit = +1 def) + (every 5 agi = +1 def) just edit the status->vit)/2 you can just use normal mathematic operators (+, * , / and -) And don't forget to consider the brackets, I find it weird that the comment says that def = level + vit/2 + agi/5 since the value is written like this: def = (level + vit)/2 + agi/5 It also applies only to renewal and be sure that changing it can imbalance your server. (not from code but from playstyle) If you wanted to change the value for pre-renewal it's just a few lines later, this line: status->def2 += status->vit; just multiply it with 2 after the vit.
  7. If the quest is not working caused by a script error it might be line 49: if(countitem(7226) < 8 || countitem(1061) < 100 || countitem(7188) < 1000 || countitem(4299) < 2000 || countitem(7036) < 10 || countitem(7450) < 3 || countitem(7300) < 10 || countitem(2507) < 15 || countitem(1614) < 1 || countitem(1737) < 1 || ) goto L_noItems; Try to remove the last or-operator (yes, the ||) since there's no statement after it. The rest should be fine, as far as I can see. Maybe you should try to leave that label-coding and script a bit more with select and switches instead of menu, it's more well-arranged and others can read your script better. Also: Please write more about the problem, if the NPC isn't working, if the mapserver gives you an error message or if the NPC isn't doing what you expect/want him to be doing.
  8. Please take your time, when you're writing a post to get help on this section. I'm not a native speaker, just like you (hopefuly), yet I take my time to explain my problem better and I'm choosing my topictitle a bit more careful, nobody wants to help you unless he's really bored(like me). You just have to edit this line: switch(select( (countitem(25003)?"I have a GM's Approval Card":"") + ":Guild List")) { and replace it with this: switch(select( ((countitem(25003) || getgmlevel() == 99 ) ?"I have a GM's Approval Card":"") + ":Guild List")) { This will show "Guild List" directly for a GM, the rest of your desires are already fulfilled in this script.
  9. We could help you better, if you'd give us a bigger snippet of your code, since you only gave us the SQL query content we can't say if there's something wrong with your syntax. I'd say it could work if you'd replace .CharLevel$ with "+.CharLevel$+" .
  10. ... It's your script shouldn't you be able to find a part where you can just include this code? Didn't I explain it enough?
  11. skyleo

    help again

    Sorry but you can't understand this because it's bad explained. Take your time while typing and explaining and you will get your codesnippet faster. EDIT: I won't answer till I can't understand what you mean. And it's still really bad, you might take a friend to help you who can speak good english.
  12. I think it won't reach this part, because the content in the called ( of callsub ) will have a close;. To test this you can just write a mes "I want to know if the script reachs this part"; before the setting. Do it since we're debugging
  13. skyleo

    changegm NPC

    But there's one thing I don't like at this script, maybe one could help us. I save the returned value of the command in @success, but this is unneccesary because there is a var which is fixed and has the last value an command returned. But unfortunately I forgot his name ...
  14. It's temporary, but you don't have to save it, since you can just create this variable exactly at the point where you're deleting the [HC]. As I said in my post, it's a loss of ressources when you save things like that.
  15. Maybe the Script doesn't get as far to set variable. When there was a close at the labels called with callsub it will be skipped. So just put the set bincat_quel, bincat_quel^1; before the } else { at the beginning of the quest in the labels. Okay? (Don't forget Category 1 = set bincat_quel, bincat_quel^1; Category 2: set bincat_quel, bincat_quel^1;)
  16. Can I see the finished script please?
  17. So you used my one to accept the quest? I hope you didn't also use it for completing a quest, which you had started with your old script.
  18. It works only when you accepted the quest when you used my script. Important Tip: Don't complete the quest with my script when you've started the quest with you're old one. This will mix it up.
  19. Du meinst es ginge mit den gegebenen Parametern delay1 und delay2, die man bei normalen Spawnen hätte? @Psysk: Sehe keinen Fehler, sollte eigentlich klappen. Haste auch reloadscript benutzt oder Map-Server neugestartet? EDIT: Es wäre mit delay1 und delay2 möglich, allerdings wäre es laut dem Thread, den ich hier bereits oben erwähnt hatte, kein Zufall, und somit nicht die Lösung, die sich Psysk wünscht. Wenn man natürlich delay2 als rand(240000) einträgen könnte/dürfte, ginge das, aber ich denke mal, das ginge nicht. So z.B.: kh_dun02,0,0,0,0 boss_monster Kiel D-01 1734,1,300000,rand(240000),0 Aber wie gesagt,klappen wird's garantiert net.
  20. Jo, also funktioniert es, mit vielen SRC-Modifizierungen, das wollte er doch nur wissen.
  21. I don't think you can mess up my script since I explained my changes. Just add your cooltime yourself, cause you need to learn it, not me. I won't support lazy persons.
  22. Better suggestion(cause this will use less ressources than the other solution): Just do this: set @oldname$, replacestr(strcharinfo(0), "[HC]", ""); // Would delete all [HC]s so if the name is [HC]Marvin_s[HC] it would be Marvin_s If you just want to delete the [HC] at beginning, do this: set @oldname$, substr(strcharinfo(0), 4, getstrlen(strcharinfo(0)); //Skips the first 4 Characters ([HC]) and just returns the part after the 4th character. EDIT: Uses now strcharinfo(0) instead of var.
  23. skyleo

    changegm NPC

    Fine simple script but pls change this: atcommand "@changegm "+#input$+""; in this: guildchangegm(getcharid(2), @input$); And pls use a temporary character var, why permanent account? You need to add an if when using this command: if(getguildmaster(getcharid(2)) != strcharinfo(0)) { mes "You're not the guildmaster of this guild"; close; } Also this If would make sense: if(!getcharid(2)) { mes "You're in none guild!"; close;} EDIT: Here the corrected script: prontera,0,0,0 script Changer 100,{ if(!getcharid(2)) { mes "You're in none guild!"; close;} if(getguildmaster(getcharid(2)) != strcharinfo(0)) { mes "You're not the guildmaster of this guild"; close; } if(agitcheck()){ mes "War is currently in progress"; close; } mes "OK Please Input the name of the character"; mes "The player mus be online!"; next; input @input$; set @success, guildchangegm(getcharid(2), @input$); if(!@success) { mes "Something's wrong, maybe the player doesn't exist."; close; } mes "Done!"; close; } EDIT: Forgot a close; when failing lawl.
  24. skyleo

    changegm NPC

    Would be nice if you could say exactly what you're meaning with change gm. Deactivate and Activate GM Powers? Setting GM Level?
  25. ... Wtf pls think before writing the word check is obviously meaning that it only checks if he got's a warg. if(checkwug()) { mes "Holy shit, you got a warg!!!"; } See what I mean? Also I think it makes more sense to add this snippet of code just to the part before warping. Like this: mes "Thankyou for registering Mr. " + strcharinfo(0) + ", Have fun!"; setmadogear 0; setdragon 0; if( ismounting() ) setmounting; setriding 0; setfalcon 0; setcart 0; warp "pvp_n_1-5",99,101; So you can delete this part completely, cause it's just unneccesary to do it with OnTouch: pvp_n_1-5,99,101,0 script disable_cart -1,3,3,{ end; OnTouch: setmadogear 0; setdragon 0; if( ismounting() ) setmounting; setriding 0; setfalcon 0; setcart 0; end; }
×
×
  • Create New...