Jump to content

deathscythe13

Members
  • Posts

    118
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by deathscythe13

  1. @whobuy Nevermind i got it to work
  2. prontera,156,182,5 script Jobchanger 100,{ if(Class == Job_Novice && JobLevel == 10 && SkillPoint == 0) { jobchange Job_Knight; getitem 2237,1; getitem 1404,1; set BaseLevel, 1; } end; }
  3. add in the edit i gave you Class== Job_Novice set BaseLevel, 1;
  4. oh sorry for the late reply i was sleeping , you should put a <TAB> like this: prontera,156,182,5<TAB>script<TAB>Skill All<TAB>100,{ im gonna see your warper in a minute EDIT: hmm your warper has no errors >.<, what exactly is the problem?
  5. can you please show your warper? and also put it in codebox for the 2nd is it like this? prontera,156,182,5 script Skill All 100,{ set .@jobminlvl,10; // set job lvl minimum mes "[skill All]"; mes "Hi i do you like to have all skills?"; next; if(select("Yes:No")==2) { mes "[skill All]"; mes "Goodbye"; close; } if(JobLevel < .@jobminlvl) { mes "[skill All]"; mes "Your job lvl is not enough.!"; close; } mes "[skill All]"; mes "Here you go!"; emotion e_no1; atcommand "@skillall"; close; }
  6. - script BOSSKILL -1,{ OnNPCKillEvent: setarray .BOSSID[0],1511,1647,1785,1630,1399,1039,1874,2068,1272,1719,1046,1389,1112,1115,1957, 1418,1871,1252,1768,1086,1688,1646, 1373,1147,1059,1150,1956,2022,1087,1190,1038,1157,1159,1502,1623,1650,1583, 1708,1312,1751,1685,1648,1917,1658; for (set .@i, 0; .@i < getarraysize(.BOSSID) && killedrid!= .BOSSID[.@i]; set .@i, .@i + 1) if (killedrid == .BOSSID[.@i]) set .@isboss, 1; if (!.@isboss) end; announce "Player " +strcharinfo(0) +" has killed "+getmonsterinfo(.BOSSID[.@i],0)+"!",0; end; } try this since you are using eAthena 15087M
  7. yes set .Hour,24*(days of month);
  8. prontera,156,182,5 script Jack en Poy 100,{ mes "[Jack en Poy]"; mes "Hi do you like to play jack en poy?"; next; menu "Yes",L_YES,"No",L_NO; L_NO: next; mes "[Jack en Poy]"; mes "Ok Comeback again."; close; L_YES: next; mes "[Jack en Poy]"; if(.@wincount == 7) { mes "Wow your good!! "; getitem 5137,1; set .@wincount,0; close; } mes "OK here goes"; set .@npcpoy, rand(1,3); // 1 = Rock , 2 = Paper, 3 = Scissors set .@yourspoy, rand(1,3); next; mes "....."; next; if(.@npcpoy == 1 && .@yourspoy == 2) { emotion e_paper, 1; emotion e_rock, 0; mes "You win!"; set .@wincount, .@wincount+1; goto L_YES; } if(.@npcpoy == 1 && .@yourspoy == 3) { emotion e_scissors, 1; emotion e_rock, 0; mes "You lose!"; set .@wincount, 0; mes "Sorry dude! better luck next time!"; close; } if(.@npcpoy == 2 && .@yourspoy == 1) { emotion e_rock, 1; emotion e_paper, 0; mes "You lose!"; set .@wincount, 0; mes "Sorry dude! better luck next time!"; close; } if(.@npcpoy == 2 && .@yourspoy == 3) { emotion e_scissors, 1; emotion e_paper, 0; mes "You win!"; set .@wincount, .@wincount+1; goto L_YES; } if(.@npcpoy == 3 && .@yourspoy == 1) { emotion e_rock, 1; emotion e_scissors, 0; mes "You win!"; set .@wincount, .@wincount+1; goto L_YES; } if(.@npcpoy == 3 && .@yourspoy == 2) { emotion e_paper, 1; emotion e_scissors, 0; mes "You lose!"; set .@wincount, 0; mes "Sorry dude! better luck next time!"; close; } mes "Its a draw!"; goto L_YES; } how about this i made mine but this still needs an improvement
  9. like this? //item1 case 1: if (countitem(3301) == 0) { if(countitem(3302)) delitem 3302,1; if(countitem(3303)) delitem 3303,1; if(countitem(3304)) delitem 3304,1; set .@id,3301; goto GetToken; } break; //item2 case 2: if (countitem(3302) == 0) { if(countitem(3301)) delitem 3301,1; if(countitem(3303)) delitem 3303,1; if(countitem(3304)) delitem 3304,1; set .@id,3302; goto GetToken; } break; //item3 case 3: if (countitem(3303) == 0) { if(countitem(3302)) delitem 3302,1; if(countitem(3301)) delitem 3301,1; if(countitem(3304)) delitem 3304,1; set .@id,3303; goto GetToken; } break; //item4 case 4: if (countitem(3304) == 0) { if(countitem(3302)) delitem 3302,1; if(countitem(3303)) delitem 3303,1; if(countitem(3301)) delitem 3301,1; set .@id,3304; goto GetToken; } break;
  10. there's no error in your script right? >.< try putting the npc first in other places aside from custom map, if it wont error then must be the client, also when you loggedin you get error directly? or when you only talk to the npc?
  11. i tried it here its working fine the menu are showing up EDIT: can you tell me what errors do you have now? here is the screenshot if you want:
  12. .@house means it counts all the data in the `house` table while .@check gets the guild_id of each house so if you have 39 houses your .@house = 39, i only iterate starting from 0 though but you can change it.. and .@check is an array so if .@check[0] which is the first row of your house it returns the "guild_id of the first row" you can try also in the actual sql "SELECT guild_id FROM `house` WHERE 1" if you want to test it out too , im sorry im not good at explaining >.<
  13. as the title says, does anyone have @whobuy or who can help me with it? thanks
  14. ohh ok how about this: set .@menu$,""; set .@house, query_sql("SELECT guild_id FROM `house` WHERE 1",.@check); for( set .@i, 0; .@i < .@house; set .@i , .@i+ 1) { if(.@check[.@i]) set .@menu$, ""+ .@menu$ +"House No. [^006633" + .@i + "^000000] - [^FF0000Reserved^000000]"; else set .@menu$, ""+ .@menu$ +"House No. [^006633" + .@i + "^000000] - [^006633Empty^000000]"; set .@menu$, .@menu$ + ":"; } didn't test it yet, maybe in a few minutes
  15. how about this query_sql "DELETE FROM `global_reg_value` WHERE str LIKE '%#%'";
  16. prontera,156,182,5 script Jobchanger 100,{ if(Job_Novice && JobLevel == 10 && SkillPoint == 0) { jobchange Job_Knight; getitem 2237,1; getitem 1404,1; } end; } EDIT: Oops my bad! it should have been if Class== Job_Novice Ohh and add set BaseLevel, 1; after getitem 1404,1; so that he/she will be a knight 1/1
  17. your .@check i think is only querying how many houses you have from 1 to 39 >.< and nothing to check if they are reserve or not and your query is inside the loop should have been outside and why are you looping from 1 to 39 and your query has a WHERE `house_id` which is a primary key and unique so that should only return 1.. EDIT: are there values in your house already like from 1-39? how about adding another column "reserved" or something to check if that house has been reserved
  18. tr0n global_reg_value can still be checked without querying in sql with just using the variable name only EDIT here's my code btw assuming you are using reborncount variable: input .@player$; if(!getcharid(0,.@player$)) { mes "Player is not found!"; close; } attachrid(getcharid(0,.@player$)); mes strcharinfo(0)+" has been reborn for "+reborncount+" times"; close; btw ays you can refer also here: Prefix: scope and extent nothing - A permanent variable attached to the character, the default variable type. They are stored with all the account data in "saveathena.txt" in TXT versions and in the SQL versions in the `global_reg_value` table using type 3. "@" - A temporary variable attached to the character. SVN versions before 2094 revision and RC5 version will also treat 'l' as a temporary variable prefix, so beware of having variable names starting with 'l' if you want full backward compatibility. "$" - A global permanent variable. They are stored in "savemapreg.txt" or database table `mapreg`, depending on server type. "$@" - A global temporary variable. This is important for scripts which are called with no RID attached, that is, not triggered by a specific character object. "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling 'getvariableofnpc'. Function objects can also have .variables which are accessible from inside the function, however 'getvariableofnpc' does NOT work on function objects. ".@" - A scope variable. They are unique to the instance and scope. Each instance has it's own scope that ends when the script ends. Calling a function with callsub/callfunc starts a new scope, returning from the function ends it. When a scope ends, it's variables are converted to values ('return .@var;' returns a value, not a reference). "'" - An instance variable These are used with the instancing system, and are unique to each party's instance. "#" - A permanent local account variable. They are stored with all the account data in "saveaccreg.txt" in TXT versions and in the SQL versions in the 'global_reg_value' table using type 2. "##" - A permanent global account variable stored by the login server. They are stored in "saveaccount.txt" and in the SQL versions in the 'global_reg_value' table, using type 1. The only difference you will note from normal # variables is when you have multiple char-servers connected to the same login server. The # variables are unique to each char-server, while the ## variables are shared by all these char-servers. Postfix: integer or string nothing - integer variable, can store positive and negative numbers, but only whole numbers (so don't expect to do any fractional math) '$' - string variable, can store text Examples: name - permanent character integer variable name$ - permanent character string variable @name - temporary character integer variable @name$ - temporary character string variable $name - permanent global integer variable $name$ - permanent global string variable $@name - temporary global integer variable $@name$ - temporary global string variable .name - NPC integer variable .name$ - NPC string variable .@name - scope integer variable .@name$ - scope string variable #name - permanent local account integer variable #name$ - permanent local account string variable ##name - permanent global account integer variable ##name$ - permanent global account string variable
  19. np
  20. prontera,155,93,4 script All in One NPC 100,{ mes "[All in One NPC]"; mes "Please select:"; next; switch(select("Job Master:Rental:Reset:Platinum Skills")) { case 1: callfunc "jobmaster"; break; case 2: callfunc "rental"; break; case 3: callfunc "reset"; break; case 4: callfunc "platinum"; break; } } function script jobmaster { mes "^ff0000[All in One NPC]^000000"; if(Class >= Job_Rune_Knight) goto L_noReq; if(SkillPoint != 0) { mes "I'm sorry, please use up all your skill points before changing jobs"; mes "Please come again soon!"; close; } if(JobLevel < 10) goto L_LvError; switch(Class){ case Job_Novice_High: case Job_Baby: case Job_Novice: skill 142,1,0; skill 143,1,0; mes "Welcome, please select the job you wish to change into"; if(lastJob != 0 && Class == Job_Novice_High){ switch(lastJob){ case Job_Knight: case Job_Crusader: set @target_job, Job_Swordman_High; break; case Job_Monk: case Job_Priest: set @target_job, Job_Acolyte_High; break; case Job_Alchemist: case Job_Blacksmith: set @target_job, Job_Merchant_High; break; case Job_Rogue: case Job_Assassin: set @target_job, Job_Thief_High; break; case Job_Wizard: case Job_Sage: set @target_job, Job_Mage_High; break; case Job_Hunter: case Job_Bard: case Job_Dancer: set @target_job, Job_Archer_High; break; } } else { switch(select("Swordsman","Mage","Archer","Acolyte","Merchant","Thief", "Super Novice","Taekwon","Gunslinger","Ninja")){ case 7: if(Class == Job_Novice_High) goto L_noReq; if($@JC_SupNovM > BaseLevel) goto L_BvError; if(Upper == 2) set @target_job, Job_Super_Baby; else set @target_job, Job_SuperNovice; break; case 8: if(Class == Job_Novice_High) goto L_noReq; if(Upper == 2) goto L_noReq; set @target_job, Job_Taekwon; break; case 9: case 10: if(Class == Job_Novice_High || Upper == 2) goto L_noReq; set @target_job, @menu + 15; break; default: set @target_job, @menu; if(Class == Job_Novice_High) set @target_job, @target_job + 4001; break; } } mes "Are you sure you want to change to " + JobName(@target_job) + "?"; if(select("Yes","No") == 1){ callfunc "Job_Change", @target_job; if(@target_job == Job_Gunslinger || @target_job == Job_Ninja || @target_job == Job_Taekwon) { callfunc "F_ClearJobVar"; } else { if($@JC_Plat) goto L_GivePlat; } } close; break; default: if(JobLevel < $@JC_MinimumJB) goto L_LvError; deletearray @job_opt, getarraysize(@job_opt); if(Class < Job_Knight || Class == Job_Taekwon || (Class > Job_Baby && Class < Job_Baby_Knight) || (Class > Job_Novice_High && Class < Job_Lord_Knight)){ if(lastJob != 0 && Class >= Job_Swordman_High){ // lastJob could have been set before changing back to non-trans set @target_job, lastJob + 4001; } else { switch(Class){ case Job_Swordman_High: case Job_Baby_Swordman: case Job_Swordman: set @job_opt[0], Job_Knight; set @job_opt[1], Job_Crusader; break; case Job_Mage_High: case Job_Baby_Mage: case Job_Mage: set @job_opt[0], Job_Wizard; set @job_opt[1], Job_Sage; break; case Job_Archer_High: case Job_Baby_Archer: case Job_Archer: set @job_opt[0], Job_Hunter; if(Sex == 0) set @job_opt[1], Job_Dancer; else set @job_opt[1], Job_Bard; break; case Job_Acolyte_High: case Job_Baby_Acolyte: case Job_Acolyte: set @job_opt[0], Job_Priest; set @job_opt[1], Job_Monk; break; case Job_Merchant_High: case Job_Baby_Merchant: case Job_Merchant: set @job_opt[0], Job_Blacksmith; set @job_opt[1], Job_Alchemist; break; case Job_Thief_High: case Job_Baby_Thief: case Job_Thief: set @job_opt[0], Job_Assassin; set @job_opt[1], Job_Rogue; break; default: set @job_opt[0], Job_Star_Gladiator; set @job_opt[1], Job_Soul_Linker; break; } mes "Welcome, please select the job you wish to change into"; set @target_job, @job_opt[select(JobName(@job_opt[0]), JobName(@job_opt[1]))-1]; if(Class > Job_Novice_High && Class < Job_Lord_Knight) set @target_job, @target_job + 4001; } mes "Are you sure you want to change to " + JobName(@target_job) + "?"; if(select("Yes","No")==1){ callfunc "Job_Change", @target_job; if(@target_job == Job_Star_Gladiator || @target_job == Job_Soul_Linker) { callfunc "F_ClearJobVar"; } else { if($@JC_Plat) goto L_GivePlat; } } close; } if(BaseLevel < 99 || JobLevel < 50) goto L_cantCh; if(checkfalcon() || checkcart() || checkriding()) goto L_remove; if((Class >= Job_Knight) && (Class <= Job_Crusader2)){ mes "Would you like to be reborn or change to 3rd class?"; switch(select("I want to be reborn!", "I want to change to 3rd class!", "Cancel")) { case 1: mes "Are you sure you want to be reborn?"; if(select("Yes", "No")==1){ set lastJob, Class; if(Class == Job_Knight2){ set lastJob, Job_Knight; } else { if(Class == Job_Crusader2){ set lastJob, Job_Crusader; } } jobchange Job_Novice_High; resetlvl(1); skill 142,1,0; skill 143,1,0; } break; case 2: goto L_Third; } close; } if (Class >= Job_Lord_Knight && Class <= Job_Paladin2) { if(JobLevel < 50) goto L_cantCh; goto L_Third; } } mes "I'm sorry, there are no further classes for your job."; close; L_Third: set @target_job, roclass(eaclass() | EAJL_THIRD); mes "Are you sure you want to change to " + JobName(@target_job) + "?"; if(select("Yes", "No")==1){ callfunc "Job_Change", @target_job; } close; L_GivePlat: if (BaseClass==Job_SuperNovice) goto L_sSuperN; if (BaseClass==Job_Swordman) goto L_sSword; if (BaseClass==Job_Mage) goto L_sMage; if (BaseClass==Job_Archer) goto L_sArcher; if (BaseClass==Job_Acolyte) goto L_sAcolyte; if (BaseClass==Job_Merchant) goto L_sMerchant; if (BaseClass==Job_Thief) goto L_sThief; close; L_sSuperN: skill 142,1,0; close; L_sSword: skill 142,1,0; skill 144,1,0; skill 145,1,0; skill 146,1,0; close; L_sMage: skill 142,1,0; skill 157,1,0; close; L_sArcher: skill 142,1,0; skill 147,1,0; skill 148,1,0; close; L_sAcolyte: skill 142,1,0; skill 156,1,0; close; L_sMerchant: skill 142,1,0; skill 153,1,0; skill 154,1,0; skill 155,1,0; close; L_sThief: skill 142,1,0; skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; close; L_cantCh: mes "I'm sorry, you do not meet the requirements to change"; mes "Please come again soon!"; close; L_LvError: mes "I'm sorry, you do not seem to have enough Job Levels"; mes "Please come again soon!"; close; L_BvError: mes "I'm sorry, you do not seem to have enough Base Levels"; mes "Please come again soon!"; close; L_noReq: mes "I'm sorry, you do not meet the requirements to change"; mes "Please come again soon!"; close; L_remove: mes "Please remove your cart,falcon or peco"; mes "Please come again soon!"; close; OnInit: // Variable Setup set $@JC_MinimumJB, 40; //Minimum job level for changing to 2nd classes (Default : 40) set $@JC_Plat, 1; //Give Platinum skills on Jobchange (Default : 1-yes) set $@JC_SupNovM, 45; //Base Level to change into Super Novice (Default : 45) end; } function script rental { mes "[All in One NPC]"; mes "Hi, here you can rent Carts, Falcons or Pecopecos."; next; switch(select("Cart:Falcon:Peco")) { case 1: if((BaseClass == Job_Merchant || BaseJob == Job_SuperNovice) && checkcart() == 0 && getskilllv("MC_PUSHCART")>0) { setcart; close; } else { mes "[All in One NPC]"; mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill."; close; } case 2: if(BaseJob != Job_Archer && BaseClass == Job_Archer && checkfalcon() == 0 && getskilllv("HT_FALCON")>0) { setfalcon; close; } else { mes "[All in One NPC]"; mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill."; close; } case 3: if (BaseJob != Job_Swordman && BaseClass == Job_Swordman && checkriding() == 0 && getskilllv("KN_RIDING")>0) { setriding; close; } else { mes "[All in One NPC]"; mes "Sorry " + strcharinfo(0) + ", Please make sure you are the required job and have the required skill."; close; } } } function script reset { set .rskill,5000; // Set value in zeny for skill reset here set .rstat,5000; // Set value in zeny for stat reset here set .rboth,9000; // Set value for "package deal" (i.e.: reseting both) here. mes "[All in One NPC]"; mes "I am a All in One NPC."; mes "Reset Stats: "+ .rstat +"z"; mes "Reset Skills: "+ .rskill +"z"; mes "Reset Both: "+ .rboth +"z"; mes "Please select the service you want:"; next; switch(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Quit")) { case 1: mes "[All in One NPC]"; if (Zeny < .rskill) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,Zeny-.rskill; ResetSkill; close; case 2: mes "[All in One NPC]"; if (Zeny < .rstat) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,Zeny-.rstat; ResetStatus; close; case 3: mes "[All in One NPC]"; if (Zeny < .rboth) { mes "Sorry, you don't have enough Zeny."; close; } mes "Alright, here we go now.. Remember, changes won't take effect until you log back on!"; set Zeny,Zeny-.rboth; ResetSkill; ResetStatus; close; case 4: mes "Come again soon!"; close; } } function script platinum { mes "[All in One NPC]"; mes "I can give you the special skills available to your job."; mes "Would you like these skills now?"; next; if (select("Yes Please:No thanks") == 2) { mes "[All in One NPC]"; mes "Have a nice day... >.>"; close; } skill 142,1,0; // First Aid if (BaseClass == Job_Novice) { skill 143,1,0; // Play Dead } else if (BaseClass == Job_Swordman) { skill 144,1,0; // Moving HP-Recovery skill 145,1,0; // Fatal Blow skill 146,1,0; // Auto Berserk } else if (BaseClass == Job_Mage) { skill 157,1,0; // Energy Coat } else if (BaseClass == Job_Archer) { skill 147,1,0; // Arrow Crafting skill 148,1,0; // Arrow Repel } else if (BaseClass == Job_Merchant) { skill 153,1,0; // Cart Revolution skill 154,1,0; // Change Cart skill 155,1,0; // Crazy Uproar } else if (BaseClass == Job_Thief) { skill 149,1,0; // Sand Attack skill 150,1,0; // Back Slide skill 151,1,0; // Find Stone skill 152,1,0; // Stone Fling } else if (BaseClass == Job_Acolyte) { skill 156,1,0; // Holy Light } if (Class == Job_Knight || Class == Job_Lord_Knight) { skill 1001,1,0; // Charge Attack } else if (Class == Job_Crusader || Class == Job_Paladin) { skill 1002,1,0; // Shrink } else if (Class == Job_Wizard || Class == Job_High_Wizard) { skill 1006,1,0; // Sight Blaster } else if (Class == Job_Sage || Class == Job_Professor) { skill 1007,1,0; // Create Elemental Converter skill 1008,1,0; // Elemental Change Water skill 1017,1,0; // Elemental Change Earth skill 1018,1,0; // Elemental Change Fire skill 1019,1,0; // Elemental Change Wind } else if (Class == Job_Hunter || Class == Job_Sniper) { skill 1009,1,0; // Phantasmic Arrow } else if (Class == Job_Bard || Class == Job_Clown) { skill 1010,1,0; // Pang Voice } else if (Class == Job_Dancer || Class == Job_Gypsy) { skill 1011,1,0; // Wink of Charm } else if (Class == Job_Blacksmith || Class == Job_Whitesmith) { skill 1012,1,0; // Unfair Trick skill 1013,1,0; // Greed } else if (Class == Job_Alchemist || Class == Job_Creator) { skill 238,1,0; // Bioethics } else if (Class == Job_Assassin || Class == Job_Assassin_Cross) { skill 1003,1,0; // Sonic Acceleration skill 1004,1,0; // Throw Venom Knife } else if (Class == Job_Rogue || Class == Job_Stalker) { skill 1005,1,0; // Close Confine } else if (Class == Job_Priest || Class == Job_High_Priest) { skill 1014,1,0; // Redemptio } else if (Class == Job_Monk || Class == Job_Champion) { skill 1015,1,0; // Ki Translation skill 1016,1,0; // Ki Explosion } mes "[All in One NPC]"; mes "There you go!"; close; } Here you go, btw i just copy pasted the actual jobmaster, rental, reset, platinum from the customs rAthena and made it into a function
  21. Here is a simple skill seller that require item payment enjoy Simple Skill Seller
  22. //Made by deathscythe13 prontera,155,93,4 script Skill Point seller 100,{ set .@paymentitemid,7227; // Edit Item ID use set .@paymentamount,50; // Edit Amount mes "[skill Point Seller]"; mes "Hi i can sell you skill points for "+.@paymentamount+" "+getitemname(.@paymentitemid)+" equals 1 Skill Point"; mes "Do you like to buy a skill point?"; next; if(select("Yes:No")==2) { mes "[skill Point Seller]"; mes "Ok Bye."; close; } mes "[skill Point Seller]"; mes "please input how many skill points you want or enter 0 to cancel"; next; input .@points; next; mes "[skill Point Seller]"; if(!.@points) { mes "You have canceled buying."; close; } if(countitem(.@paymentitemid) < (.@points*.@paymentamount)) { mes "Sorry your "+getitemname(.@paymentitemid)+" is not enough."; close; } delitem .@paymentitemid,(.@points*.@paymentamount); set SkillPoint, SkillPoint+.@points; mes "There you go have a nice day."; close; }
×
×
  • Create New...