Jump to content

Patskie

Members
  • Posts

    1702
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Patskie

  1. Try : prontera,150,150,0 script Freebies 100,{ setarray .Items[0], 5013,5,7,4002,5,0; // <item id>,<amount>,<refine> set .size, getarraysize(.Items); if ( #Freebies ) end; mes "Here is your freebies!"; next; if ( (MaxWeight/2) <= Weight ) end; for ( set .@i, 0; .@i < .size; set .@i, .@i + 3 ) getitembound2 .Items[.@i],.Items[.@i+1],1,.Items[.@i+2],0,0,0,0,0,1; set #Freebies, 1; mes "Done!"; close; } If you want it that way. check their ip address
  2. Oh i forgot why i shouldn't use compare!
  3. Didn't test : - script Sample -1,{ setarray .black_list_mob[0],1002; set .size, getarraysize(.black_list_mob); set .amount, 5; OnNPCKillEvent: getmapxy .@map$, .@x, .@y, 0; for ( set .@i, 0; .@i < .size, set .@i, .@i + 1 ) { if ( killedrid == .black_list_mob[.@i] ) end; else makeitem 607,.amount,.@map$,.@x,.@y; } end; }
  4. Please maintain english language in this section. If you can't express yourself then the international community are there to help you out. In this case, i replace your native language to english. Hope it wouldn't mind you
  5. @loadnpc <npc path> command is sufficient. Post error if any?
  6. What i mean is that stick with my script with post#2. What i want you to do is to create another text file on npc folder and change $@guild_owner to $@guild_owner1 since the first script is already using it. You can't stick to $@guild_owner because it is a global variable
  7. You need to create a php script for that.
  8. Well your script is a function. If you will not use callfunc then it will not work. If you want it to work once a player login. Use this : - script loginjob -1,{ OnPCLoginEvent: if ( BaseClass == Job_X ) { skill "TF_HIDING",1; } else if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; } else { skill "MG_SIGHT",1; } end; }
  9. My npc uses a global temporary variable ( $@guild_owner ). If you plan to make multiple npc's with same function but you want it in a way that other guild can buy the other npc's. Just change the guild_owner to anything ( $@guild_owner1 , $@guild_owner2 ) and so on
  10. Patskie

    @speed bug

    If you think this is a bug. Kindly post it in our bug tracker
  11. Create multiple npc's then with the same function? Having 2 .txt files?
  12. Refer to query_sql for the syntax : - script Sample -1,{ OnPCLoginEvent: if ( gettimetick(2) < #timer ) dispbottom "Time left : " + ( #timer - gettimetick(2) ) + " seconds."; else { // .. your insert query_sql #timer = gettimetick(2) + 86400; } end; }
  13. IMO there is no point on asking this, by asking how safe if you give complete server access to some unknown person. It's like giving your money on some unknown person and trust him/her that he/she will give it back isn't it?
  14. After OnMinute50: add this : announce "Zombie invasion has begun!",0;
  15. Try this one, bear with my laziness xD i didn't include many dialogues. - script Sample::test -1,{ if ( !getcharid(2) ) end; if ( !$@guild_owner && getcharid(2) ) { if ( getguildmaster( getcharid(2) ) != strcharinfo(0) ) end; mes .npc$; mes "Buy me for " +.prize_of_npc+ " zeny."; next; mes .npc$; if ( Zeny < .prize_of_npc ) mes "You don't have enough zeny"; else Zeny -= .prize_of_npc; $@guild_owner = getcharid(2); announce "[" +getguildname($@guild_owner)+ "] guild bought me for " +.prize_of_npc+ " zeny!",0; close; } if ( getcharid(2) != $@guild_owner ) { mes .npc$; mes "This npc is not dedicated on your guild"; close; } mes .npc$; mes "What you want me to do master?"; next; switch(select("Heal Me:No thanks:" +(getguildmaster($@guild_owner)==strcharinfo(0)?"Sell me":""))) { case 1: percentheal 100,100; break; case 2: break; case 3: mes .npc$; mes "Done!"; Zeny += .prize_of_npc; announce getguildmaster($@guild_owner)+ " sell me. Someone buy me!",0; $@guild_owner = 0; break; default: debugmes "Error on NPC " +.npc$; break; } OnInit: .prize_of_npc = 20; .npc$ = strnpcinfo(1); end; } prontera,150,150,0 duplicate(test) Sample 100 prontera,153,153,0 duplicate(test) Sample 100 Configuration : .prize_of_npc = 20; // price of npc .npc$ = strnpcinfo(1); // npc name When guild bought the npc, You can add more benefit here. On my example i only have heal benefit, i add also the "sell me" choice when talking to the npc : switch(select("Heal Me:No thanks:" +(getguildmaster($@guild_owner)==strcharinfo(0)?"Sell me":"")))
  16. You mean the location of the item? db/re/item_db.txt or db/pre-re/item_db.txt
  17. What does the halloween event do?
  18. No no, the script you show is the alternative i have made. It works fine because you pass the account id of an invoking player as an argument. what i mean is that when you try the script of the topic starter. it doesn't work even i input the online player name
  19. However when i put : getcharip("Patskiee"); it returns 127.0.0.1
  20. Either online or offline it doesn't return the ip address of a certain player. I made a test and the result is the image below :
  21. Try : prontera,150,150,0 script Freebies 100,{ setarray .Items[0], 4001,5,4002,5; // <item id>,<amount> set .size, getarraysize(.Items); if ( #Freebies ) end; mes "Here is your freebies!"; next; for ( set .@i, 0; .@i < .size; set .@i, .@i + 2 ) getitembound2 .Items[.@i],.Items[.@i+1],1,0,0,0,0,0,0,1; set #Freebies, 1; mes "Done!"; close; }
  22. Change : if(getgmlevel() >= .GMLevel){ end; } to : if ( getgmlevel() >= .GMLevel || killedrid == getcharid(3) ) { end; }
  23. To be honest i don't know what does the .@rhea_ran means. Or if you want you can do the code you made in the else if statement else if ( rand(100) < 20 ) { getitem 4399,1; //Thanatos Card mapannounce "trinity","" + strcharinfo(0) + " has caught a Thanatos Card!!",bc_map,"0xff77ff"; }
×
×
  • Create New...