Jump to content

Magic-Maker

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by Magic-Maker

  1. You should insert another switch(select) after select which dungeon for select the dungeon's level case 2: mes "[Warp Agent]"; mes "Please select which dungeon you would like to be teleported to."; next; switch(select("Abyss Lake")) { case 1: mes "[Warp Agent]"; mes "Please select Dungeon's Level Which you wanna go"; next; switch(select("Level 1:Level2:Level3")) { case 1: warp "abyss_01",263,271; end; case 2: warp "abyss_02",263,271; end; case 3: warp "abyss_03",263,271; end; } break;
  2. It's still have some problem. When It's display mes of rangis(after 10 sec) it will show an error check_near. I'm not too clear. What is only one person to quest you mean 1. Only one can go thorght the quest and next have to wait him untill he end the quest. 2. Only One person can go to kill each vakirely brother and next have to wait untill player in room go out Valkyrie.txt
  3. So I suggest you to use the script on #21. Please tell me if it doesn't work too. Ps. The Replace command can be either update and insert in one command (If you wanna update new score plus old score just select an old score first and then plus it with new score and then replace)
  4. which script you use script on comment 21 or 23 ? I suggest to use script on comment 21 because I have try it already. but on comment 23 I still have some bug. and the script on comment 21 will work no matter you set the primary key or not.
  5. prontera,100,184,6 script Valkyrie Brothers 811,{ if (#quest == 2) goto what; if (#quest == 3) goto brosecond; if (#quest == 4) goto brothird; if (#quest == 5) goto hey; if (#quest >= 6) goto yourdone; mes "[Valkyrie]"; mes "*Crys, Sniffs, Looks Up*"; mes "...Yes?"; menu "Nothing",dead,"What's wrong?",yes; dead: mes "[Valkyrie]"; mes "*Keeps Crying...*"; close; yes: mes "[Valkyrie]"; mes "Oh!! My 3 Brothers..."; mes "They took all our Family Uniques!"; mes "They are Powerful the items so are my brothers... One of them killed our Mother.."; mes "We only have Father!"; mes "..."; next; mes "[Valkyrie]"; mes "Would you help me?"; mes "Would you help me get the Items back!"; menu "I don't wanna get my ass Whooped!",dead,"Sure",yes1; yes1: mes "[Valkyrie]"; mes "Thank you"; mes "One of them lives in his own lairs..."; mes "I will Warp you there... Be careful... His Powerful.."; set #quest,1; next; warp "sec_pri",20,17; end; what: mes "[Valkyrie]"; mes "What was that?!"; mes "You are lucky I warped you out!!!"; set #quest,0; close; //Next Part2 brosecond: mes "[Valkyrie]"; mes "Hello!"; mes "Are you ready for Electron?"; next; menu "Yup!",yes4,"Not right now...",tapos2; yes4: mes "[Valkyrie]"; mes "Okay... Here's some hints..."; next; mes "My 2nd Brother is the Smartest of all..."; next; mes "He knows how to Make holograms of him self..."; next; mes "Just in-case, he made this switch that wipes out all his holograms"; next; mes "It's in the behind him on the right..."; next; mes "You Ready?"; menu "I'm more than ready!",yes5,"Nope... I'm scared...",tapos2; yes5: warp "job_prist",24,55; end; tapos2: mes "[Valkyrie]"; mes "Okay. Please come soon."; close; end; //Next Part3 brothird: mes "[Valkyrie]"; mes "Zeburh..."; mes "Oh! Hello! Are you ready for Zeburh?"; menu "I got my Buffs and my Wepaons!",yup1,"Zeburh?! Hell NO!",sarado; sarado: mes "chicken"; close; yup1: mes "[Valkyrie]"; mes "Okay..."; mes "He also Smart..."; mes "He makes Holograms too... Electron gave his system to him"; next; mes "He makes only 2 hologarms... Thank God."; next; mes "But, he makes, Rangris and Electrons..."; next; mes "Not the real ones... a Hologram"; next; mes "I'll Take you to Him now."; next; warp "06guild_01",50,56; end; hey: mes "[Valkyrie]"; mes "Thank you for saving us! Here are our Family Uniques, as in a memory of your honor."; mes "[Valkyrie]"; mes "You did it!"; mes "You got all 3 items"; mes "Me and my Father thanks you..."; mes "You know what? Keep the items!"; mes "I really don't need them!"; mes "Here!"; getitem 2410,1; getitem 2383,1; getitem 2541,1; set #quest,100; close; end; yourdone: mes "[Valkyrie]"; mes "Thank you for saving us! Here are our Family Uniques, as in a memory of your honor."; close; end; } sec_pri,19,17,1 script Rangris 1765,{ if (#quest == 1) goto play; if (#quest == 5) close; mes "[Rangris]"; mes "What are you doing in my Lair!!!"; mes "You have 3 Curse in your body!!!"; next; close2; warp "prontera",150,150; sleep2 10000; warp "prontera",0,0; sleep2 100000; warp "prontera",0,0; end; play: mes "[Rangris]"; mes "What are you doing in my Lair!!!"; mes "I will Jail you in my Lair if you tell what are you doing here!"; next; mes "Jailing in 5!"; next; mes "4!"; next; mes "3!"; next; mes "2!"; next; mes "AAAAHHH!!! MEET YOUR -"; menu "Your Sister sented me!",yes2,"Jail me! I DON'T CARE!",curse; curse: warp "sec_pri",49,76; sleep2 60000; warp "prontera",150,151; set #quest,2; end; yes2: mes "[Rangris]"; mes "Is that so..."; mes "What are you doing here?!"; menu "I need the Items...",yes3,"Just to annoyed you!",curse; yes3: mes "[Rangris]"; mes "Ha! I'm Laughing my Ass out!"; mes "You must face me and my Minons!"; next; killmonster "sec_pri","Rangris::OnEvent"; warp "sec_pri",50,75; monster "sec_pri",50,75,"Rangris",1751,1,"Rangris::OnEvent"; end; OnEvent: killmonsterall "sec_pri"; announce "Rangris: Nooo!!! Leave us alone! You can have this Garment",bc_self; getitem 2524,1; set #quest,3; warp "prontera",150,150; sleep2 10000; mes "[Valkyrie]"; mes "Thank you!"; mes "You have 1 out of 3 Items of our Family!"; delitem 2524,1; mes "*You handed over the Garment to Valkyrie*"; mes "Now for my 2nd brother... Electron"; mes "He is much more powerful than the first..."; set #quest,3; mes "I understand you need a rest..."; mes "Come back soon!"; close2; end; } job_prist,24,48,1 script Electron 1765,{ if (#quest == 3) goto play2; mes "[Electron]"; mes "Okay... Use the 'if (#quest == 1)'..."; mes ".... what?!"; mes "Who are you!? And What ARE YOU DOING HERE?!"; menu "Just to splash you with H20! Nerd...",byebye; byebye: next; mes "[Electron]"; mes "You are a waste of my TIME!"; mes "Go away you Piece of Shit!"; next; warp "prontera",150,150; end; play2: mes "[Electron]"; mes "Okay... Use the 'if (#quest == 1)'..."; mes "Who are you!? And What ARE YOU DOING HERE?!"; menu "Your Sister Sented me to get the items back",yes6,"Just to splash you with H20! Nerd...",byebye; yes6: next; mes "[Electron]"; mes "Ahh... You kill my Brother... Rangris"; next; mes "I thank you for that because his an Asshole"; next; mes "But, Killing my Brother to get the Uniques! NO!"; next; killmonster "job_prist","Electron::OnEvent2"; mes "Face the fear of my Holograms!!!"; monster "job_prist",24,48,"Electron's Holograms",1921,1,"Electron::OnEvent2"; close; end; OnEvent2: announce "Valkyrie: You have defeated Electron! You will need to turn that Lever to get the last Uniques.",bc_self; sleep2 10000; warp "jupe_ele",43,55; end; } jupe_ele,43,55,1 script Master Lever 111,{ getitem 2421,1; warp "prontera",150,150; set #quest,4; sleep2 10000; mes "[Valkyrie]"; mes "Yes! You have 2 out of 3 of my family's items!"; mes "*You handed over the Sleipnir*"; delitem 2421,1; mes "Okay... My Last and Oldest Brother..."; mes "He is the Biggest and the Fattest of all..."; mes "Zeburh..."; mes "Okay... Your Break.. I forgot..."; close; } 06guild_01,50,59,6 script Zeburh 1885,{ if (#quest == 4) goto play3; warp "prontera",150,150; end; play3: warp "06guild_01",0,0; mapannounce "06guild_01","Zeburh: Muaha!!! I know what been doing...",0; sleep2 1000; mapannounce "06guild_01","Zeburh: You need to kill Me!!!",0; goto simot; end; simot: killmonster "06guild_01","Zeburh::OnEvent3"; monster "06guild_01",0,0,"Zeburh",1885,1,"Zeburh::OnEvent3"; end; OnEvent3: mapannounce "06guild_01","Zeburh: Noo!!! I thought this will never happen!!! Take it!!!",0; warp "prontera",100,185; set #quest,5; close; end; } [/codeBOX] Umm. I have fix it and have try to complete the quest (a bit fun) and now it can complete the quest. the problem is some of your sleep2 command (check it by yourself in script). and I change a position of set #quest to before sleep2 because it will have a bug when player come back and talk to Valkyrie Brothers before the message appear and if he loggout. and I also add a killmonster command to kill monster before call it again. But I think this script has a lot of problem 1. What Happen if the quest is been playing by more than one player - -. 2. You use Sleep before delitem so he can keep it to storage or what he want in 10 sec. 3. Talk to Valkyrie Brothers or other npc before message from OnEvent (sleep2) it will appear and stack message - - and other that I hard to explain(In english - -).However, it will work properly if you play it directly and you're just one person that play it. So I suggest that if you want it to be a quest that everyone can play you have to think that how you've to do to manage a monster and event. (for example, can go to see a Rangris... one by one) I can help you if want. But I can't think what is your want ,so tell what you want and then I can suggest you how to do it. PS. Please Appologize me, If my language is bad and hard to understand.
  6. So Sorry. I've edit the post already. I haven't try the quest yet I just try an error
  7. Try this. I just check only error and fix it. prontera,100,184,6 script Valkyrie Brothers 811,{ if (#quest == 2) goto what; if (#quest == 3) goto brosecond; if (#quest == 4) goto brothird; if (#quest == 5) goto hey; if (#quest >= 6) goto yourdone; mes "[Valkyrie]"; mes "*Crys, Sniffs, Looks Up*"; mes "...Yes?"; menu "Nothing",dead,"What's wrong?",yes; dead: mes "[Valkyrie]"; mes "*Keeps Crying...*"; close; yes: mes "[Valkyrie]"; mes "Oh!! My 3 Brothers..."; mes "They took all our Family Uniques!"; mes "They are Powerful the items so are my brothers... One of them killed our Mother.."; mes "We only have Father!"; mes "..."; next; mes "[Valkyrie]"; mes "Would you help me?"; mes "Would you help me get the Items back!"; menu "I don't wanna get my ass Whooped!",dead2,"Sure",yes1; yes1: mes "[Valkyrie]"; mes "Thank you"; mes "One of them lives in his own lairs..."; mes "I will Warp you there... Be careful... His Powerful.."; set #quest,1; next; warp "sec_pri",20,17; end; what: mes "[Valkyrie]"; mes "What was that?!"; mes "You are lucky I warped you out!!!"; set #quest,0; close; dead2: mes "[Valkyrie]"; mes "*Keeps Crying...*"; close; end; //Next Part2 brosecond: mes "[Valkyrie]"; mes "Hello!"; mes "Are you ready for Electron?"; next; menu "Yup!",yes4,"Not right now...",tapos; tapos: mes "[Valkyrie]"; mes "Okay. Please come soon."; close; yes4: mes "[Valkyrie]"; mes "Okay... Here's some hints..."; next; mes "My 2nd Brother is the Smartest of all..."; next; mes "He knows how to Make holograms of him self..."; next; mes "Just in-case, he made this switch that wipes out all his holograms"; next; mes "It's in the behind him on the right..."; next; mes "You Ready?"; menu "I'm more than ready!",yes5,"Nope... I'm scared...",tapos; yes5: warp "job_prist",24,55; end; tapos2: mes "[Valkyrie]"; mes "Okay. Please come soon."; close; end; //Next Part3 brothird: mes "[Valkyrie]"; mes "Zeburh..."; mes "Oh! Hello! Are you ready for Zeburh?"; menu "I got my Buffs and my Wepaons!",yup1,"Zeburh?! Hell NO!",sarado; sarado: mes "chicken"; close; yup1: mes "[Valkyrie]"; mes "Okay..."; mes "He also Smart..."; mes "He makes Holograms too... Electron gave his system to him"; next; mes "He makes only 2 hologarms... Thank God."; next; mes "But, he makes, Rangris and Electrons..."; next; mes "Not the real ones... a Hologram"; next; mes "I'll Take you to Him now."; next; warp "06guild_01",50,56; end; hey: mes "[Valkyrie]"; mes "Thank you for saving us! Here are our Family Uniques, as in a memory of your honor."; mes "[Valkyrie]"; mes "You did it!"; mes "You got all 3 items"; mes "Me and my Father thanks you..."; mes "You know what? Keep the items!"; mes "I really don't need them!"; mes "Here!"; getitem 2410,1; getitem 2383,1; getitem 2541,1; set #quest,100; close; end; yourdone: mes "[Valkyrie]"; mes "Thank you for saving us! Here are our Family Uniques, as in a memory of your honor."; close; end; } sec_pri,19,17,1 script Rangris 1765,{ if (#quest == 1) goto play; if (#quest == 5) close; mes "[Rangris]"; mes "What are you doing in my Lair!!!"; mes "You have 3 Curse in your body!!!"; next; close2; warp "prontera",150,150; sleep2 10000; warp "prontera",0,0; sleep2 100000; warp "prontera",0,0; end; play: mes "[Rangris]"; mes "What are you doing in my Lair!!!"; mes "I will Jail you in my Lair if you tell what are you doing here!"; next; mes "Jailing in 5!"; next; mes "4!"; next; mes "3!"; next; mes "2!"; next; mes "AAAAHHH!!! MEET YOUR -"; menu "Your Sister sented me!",yes2,"Jail me! I DON'T CARE!",curse; curse: warp "sec_pri",49,76; OnMinute1: warp "prontera",150,151; set #quest,2; end; yes2: mes "[Rangris]"; mes "Is that so..."; mes "What are you doing here?!"; menu "I need the Items...",yes3,"Just to annoyed you!",curse; yes3: mes "[Rangris]"; mes "Ha! I'm Laughing my Ass out!"; mes "You must face me and my Minons!"; next; warp "sec_pri",50,75; monster "sec_pri",50,75,"Rangris",1751,1,"Rangris::OnEvent"; end; OnEvent: killmonsterall "sec_pri"; announce "Rangris: Nooo!!! Leave us alone! You can have this Garment",bc_self; getitem 2524,1; set #quest,3; warp "prontera",150,150; sleep2 10000; mes "[Valkyrie]"; mes "Thank you!"; mes "You have 1 out of 3 Items of our Family!"; delitem 2524,1; mes "*You handed over the Garment to Valkyrie*"; mes "Now for my 2nd brother... Electron"; mes "He is much more powerful than the first..."; set #quest,3; mes "I understand you need a rest..."; mes "Come back soon!"; next; close; } job_prist,24,48,1 script Electron 1765,{ if (#quest == 3) goto play2; mes "[Electron]"; mes "Okay... Use the 'if (#quest == 1)'..."; mes ".... what?!"; mes "Who are you!? And What ARE YOU DOING HERE?!"; menu "Just to splash you with H20! Nerd...",byebye; byebye: next; mes "[Electron]"; mes "You are a waste of my TIME!"; mes "Go away you Piece of Shit!"; next; warp "prontera",150,150; end; play2: mes "[Electron]"; mes "Okay... Use the 'if (#quest == 1)'..."; mes "Who are you!? And What ARE YOU DOING HERE?!"; menu "Your Sister Sented me to get the items back",yes6,"Just to splash you with H20! Nerd...",byebye; yes6: next; mes "[Electron]"; mes "Ahh... You kill my Brother... Rangris"; next; mes "I thank you for that because his an Asshole"; next; mes "But, Killing my Brother to get the Uniques! NO!"; next; mes "Face the fear of my Holograms!!!"; monster "job_prist",24,48,"Electron's Holograms",1921,1,"Electron::OnEvent2"; close; end; OnEvent2: announce "Valkyrie: You have defeated Electron! You will need to turn that Lever to get the last Uniques.",bc_self; sleep2 10000; warp "jupe_ele",43,55; end; } jupe_ele,43,55,1 script Master Lever 111,{ getitem 2421,1; warp "prontera",150,150; sleep2 10000; mes "[Valkyrie]"; mes "Yes! You have 2 out of 3 of my family's items!"; mes "*You handed over the Sleipnir*"; delitem 2421,1; mes "Okay... My Last and Oldest Brother..."; mes "He is the Biggest and the Fattest of all..."; mes "Zeburh..."; mes "Okay... Your Break.. I forgot..."; set #quest,4; end; } 06guild_01,50,59,6 script Zeburh 1885,{ if (#quest == 4) goto play3; warp "prontera",150,150; end; play3: warp "06guild_01",0,0; mapannounce "06guild_01","Zeburh: Muaha!!! I know what been doing...",0; sleep2 1000; mapannounce "06guild_01","Zeburh: You need to kill Me!!!",0; goto simot; end; simot: monster "06guild_01",0,0,"Zeburh",1885,1,"Zeburh::OnEvent3"; end; OnEvent3: mapannounce "06guild_01","Zeburh: Noo!!! I thought this will never happen!!! Take it!!!",0; warp "prontera",100,185; set #quest,5; close; end; } [/codeBOX] the error is in this line [code] announce "Valkyrie: You have defeated Electron! You will need to turn that Lever to get the last Uniques."bc_self; [/code] you fogot to add , before flag(bc_self). Valkyrie.txt
  8. mapflag "nosave" can't be set by setmapflag command (If you don't change src)
  9. The REPLACE INTO syntax looks more like INSERT (not like Update): REPLACE INTO `fishladder` (char_id,`name`,score) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',"+.@score+")"; I have try it and it can use either like "UPDATE" and like "INSERT" but my REPLACE has some mistake and have to change to query_sql "REPLACE INTO `fishladder` SET `score` = "+(.@score+(.@noitem*2))+",`char_id` = "+getcharid(0)+",`name` = '"+strcharinfo(0)+"'"; Refer from you link. It has 3 form of replace. and it's one of that REPLACE [LOW_PRIORITY | DELAYED] [iNTO] tbl_name SET col_name={expr | DEFAULT}, ... Delete Because of Some Bug for subquery.
  10. OK. I have run and try it and it work properly. But please tell if have any problem. brasilis.gat,265,74,5 script Fishing Board 857,{ mes "[Fishing Board]"; mes "Welcome to the Fishing board!"; next; mes "[Fishing Board]"; mes "What would you like to do?"; menu "View Fishing Ranks",Ranks,"Turn in some fish",Fish; Ranks: query_sql "select name, score from fishladder order by score desc limit "+ getvariableofnpc(.showpage,"FISHCONF"), .@name$, .@score; if ( !getarraysize(.@name$) ) { next; mes "[Fishing Board]"; mes "The ladder currently is empty"; close; } for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"FISHCONF") ) { next; mes "[Fishing Board]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"FISHCONF") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AA00["+ .@score[.@i] +"]"; } close; } Fish: next; mes "[Fishing Board]"; mes "What fish would you like to turn in?"; menu "Blue Fish",bFish; bFish: next; mes "Checking inventory..."; sleep2 3000; if(countitem(6096)){ set .@noitem,countitem(6096); if ( query_sql("SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score) ) { // row exists, update it query_sql "UPDATE `fishladder` SET `score` = `score` + "+.@noitem+" WHERE `char_id` = "+getcharid(0)+""; } else { // else, insert new row query_sql "INSERT INTO fishladder (`char_id`,`name`,`score`) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',"+.@noitem+")"; } delitem 6096,.@noitem; next; mes "[Fishing Board]"; mes "Fish have been retreived and score updated."; close; } else { mes "[Fishing Board]"; mes "You have no fish to turn in."; close; } } [/codeBOX]
  11. I also suguest to use "Replace". It can use in this case but have to select old score first (if it exist) and then plus the item amount to be a new score or if it isn't exist it will insert new row with score equal item amount. and one more thing is have to set a char_id field as index key brasilis.gat,265,74,5 script Fishing Board 857,{ mes "[Fishing Board]"; mes "Welcome to the Fishing board!"; next; mes "[Fishing Board]"; mes "What would you like to do?"; menu "View Fishing Ranks",Ranks,"Turn in some fish",Fish; Ranks: query_sql "select name, score from fishladder order by score desc limit "+ getvariableofnpc(.showpage,"FISHCONF"), .@name$, .@score; if ( !getarraysize(.@name$) ) { next; mes "[Fishing Board]"; mes "The ladder currently is empty"; close; } for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"FISHCONF") ) { next; mes "[Fishing Board]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"FISHCONF") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AA00["+ .@score[.@i] +"]"; } close; } Fish: next; mes "[Fishing Board]"; mes "What fish would you like to turn in?"; menu "Blue Fish",bFish; bFish: next; mes "Checking inventory..."; sleep2 3000; if(countitem(6096)){ set .@noitem,countitem(6096); query_sql "SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score; query_sql "REPLACE INTO `fishladder` SET `score` = "+.@score+(.@noitem*2)+",`char_id` = "+getcharid(0)+""; delitem 6096,.@noitem; next; mes "[Fishing Board]"; mes "Fish have been retreived and score updated."; close;} else { mes "[Fishing Board]"; mes "You have no fish to turn in."; close;} } [/codeBOX] But if you really don't want to use it. Change [code]query_sql "UPDATE `fishladder` SET `score` = `score` + "+.@noitem+",`char_id` = "+getcharid(0)+"";[/code] to [code]query_sql "UPDATE `fishladder` SET `score` = `score` + +.@noitem+ WHERE `char_id` = "+getcharid(0)+"";[/code]
  12. prontera,154,186,3 script Prontera_switch 871,{ set .@n$,"[Prontera PvP Switch]"; set @GID,getcastledata("prtg_cas03",1); if((getguildmaster(@GID) != strcharinfo(0) || @GID == 0) && getgmlevel() <= 0) { mes .@n$; mes "I am loyal and I will follow my master ^ff0000"+getguildmaster(@GID)+"^000000. We are Guardians! We defend to the bitter end!"; close; } mes .@n$; mes "Hello "+strcharinfo(0)+","; mes "what can i do for you today?"; switch(select("Enable PVP:Disable PVP:Announce")) { case 1: pvpon "prontera"; mapannounce "prontera","PvP has been enabled in Prontera by an GM!",bc_map; break; case 2: pvpoff "prontera"; mapannounce "prontera","PvP has been disabled in Prontera by an GM!",bc_map; break; case 3: mes "Please Input Your Message"; input .@m$; announce strcharinfo(0)+"("+strcharinfo(2)+"): "+.@m$,0; break; } close; } I have run to try and error already but haven't try in games yet but I think it will work as you like (have an name of announcer) change the gmlevel at getgmlevel() <= 0 change 0 to which the least gm level that need to override it. (if 50 mean gmlevel 50 and below unable to use it)
  13. So Sorry , I fogot to use subquery before "Replace" . think it will be work. bFish: next; mes "Checking inventory..."; sleep2 3000; if(countitem(6096)){ set .@noitem,countitem(6096); query_sql "SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score; query_sql "REPLACE INTO `fishladder` SET `score` = "+.@score+(.@noitem*2)+",`char_id` = "+getcharid(0)+""; delitem 6096,.@noitem; next; mes "[Fishing Board]"; mes "Fish have been retreived and score updated."; close; } else { mes "[Fishing Board]"; mes "You have no fish to turn in."; close; } [/codeBOX]
  14. I have edit Masao's Npc a bit and also added an announce feature. Please try it first because I haven't. pvp_switch.txt
  15. ^ the 'countitem' needs to be outside the string and concatenated in. Or else your query will just be: UPDATE table SET points = points + countitem(FISHID) WHERE ... I Suggest to use "Replace" instead of checking row exsit and Update or Insert it. (If you have an primary key like char_id in this case.) query_sql "REPLACE INTO `fishladder` SET `score` = `score` + "+.@amt+",`char_id` = "+getcharid(0)+"";
  16. I guest What you want is something like a quest that one char / Acc can do only ten time or do something 10 times for end quest. If it's right, I suggest you to use this For Per Char Quest set QWeight,QWeight+1; if(QWeight == 10) goto Q_END; For Per Account Quest set #QWeight,#QWeight+1; if(#QWeight == 10) goto Q_END; P.s. I think you confuse something about char and account.Plese check it what you want to do and what you've already done.
  17. If what you want is the certain weekday and certain time you can use On.. label like this On<weekday><Hour><Minute>: weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. For example , Sunday 8 PM OnSun2000: announce "Sunday 08:00 PM",0; end; it will announce "Sunday 08:00 PM" On Sunday 8 PM.
  18. OnClock0000: if(gettime(5) == 1 && gettime(6) == 1) { announce "Happy New Year",0; } end; Change 0000 after OnClock to time your want, Change Date on 1 of gettime(5) and Change Month on 1 of gettimer(6)
  19. May be that account haven't any row in table yet, Because I haven't seen any "Insert" in your code.so It can't UPDATE to the table that haven't any row yet. I suggest you to use "REPLACE" instead of "UPDATE", It let you inset a new row if it haven't and replace it if it already have it. (Make sure you set accountid to primary key). query_sql("REPLACE INTO `v4p_voters_info` SET `accountid` = '"+getcharid(3)+"',`points` = '"+.@new+"'"); PS. IF you have other filed just set it to in replace, otherwise your data will lost T T Or another way Is check that if he don't have the point,you insert it and if he already have it, you update it. But i think use replace is more easy. By the way it's your choice
  20. gm02,94,98,4 script Lower 793,{ close; //Prevent them from talking to the NPC OnInit: //Arrays setarray .lowerid[0],25200,25201,25202,25203,25204,25205,25206,25207,25208,25209,25210,25211,25212; setarray .lowername$[0],"Angel Ears","Emperor Shoulders","Gangster Scarf","Ice Cream","Little Devil Tail","Neko no Shippo","Saiyan Tail","Scarlet Angel Ears","Jirachi Rucksack","Angeling Rucksack","ArchAngeling Rucksack","Deviling Rucksack","Pokeball Rucksack"; //Regular expressions defpattern 1, "([^:]+):.*sNone(.*)", "L_None"; for(set .@i,0; .@i < getarraysize(.lowerid); set .@i, .@i+1) { defpattern 1, "([^:]+):s"+.lowerid[.@i], "L_"+.@i; defpattern 1, "([^:]+):s"+.lowername$[.@i], "L_"+.@i; } activatepset 1; end; //Finished with OnInit //Label for none L_None: if(!isequipped(24992)) end; setlook 3,0; npctalk strcharinfo(0) + " has changed his Dyna Lower Look!"; end; //Label L_.@i ,repeat a label equal your item list (L_? == set .@view_change,? L_0: set .@view_change,0; goto Change_Look; L_1: set .@view_change,1; goto Change_Look; L_2: set .@view_change,2; goto Change_Look; Change_Look: if(!isequipped(24992)) end; //Make sure they have the item equipped setlook 3,getiteminfo(.lowerid[.@view_change],11); // Call viewpoint of item and setlook npctalk strcharinfo(0) + " has changed his Dyna Lower Look!"; end; OnWhisperGlobal: if(!isequipped(24992)) end; if((@whispervar0$ == "None") setlook 3,0; for(set .@i,0; set .@i,getarraysize(.lowerid); set .@i,.@i+1) { set .@lower_id$,.lowerid[.@i]; // Invert Number to String if(@whispervar0$ == .@lower_id$ || @whispervar0$ == .lowername$[.@i]) { setlook 3,getiteminfo(.lowerid[.@i],11); end; } } }[/codeBOX] I try None and it's work . pls check did you equip 24992 before say None and then I also add Onwhisperglobal label to it But I haven't try it yet so I'm not really sure is the whisperglobal label work properly.
  21. I have modified it a bit, let it's more easy to add item and also fix an error above. gm02,94,98,4 script Lower 793,{ close; //Prevent them from talking to the NPC OnInit: //Arrays setarray .lowerid[0],25200,25201,25202,25203,25204,25205,25206,25207,25208,25209,25210,25211,25212; setarray .lowername$[0],"Angel Ears","Emperor Shoulders","Gangster Scarf","Ice Cream","Little Devil Tail","Neko no Shippo","Saiyan Tail","Scarlet Angel Ears","Jirachi Rucksack","Angeling Rucksack","ArchAngeling Rucksack","Deviling Rucksack","Pokeball Rucksack"; //Regular expressions defpattern 1, "([^:]+):.*sNone(.*)", "L_None"; for(set .@i,0; .@i < getarraysize(.lowerid); set .@i, .@i+1) { defpattern 1, "([^:]+):s"+.lowerid[.@i], "L_"+.@i; defpattern 1, "([^:]+):s"+.lowername$[.@i], "L_"+.@i; } activatepset 1; end; //Finished with OnInit //Label for none L_None: if(!isequipped(24992)) end; setlook 3,0; npctalk strcharinfo(0) + " has changed his Dyna Lower Look!"; end; //Label L_.@i ,repeat a label equal your item list (L_? == set .@view_change,? L_0: set .@view_change,0; goto Change_Look; L_1: set .@view_change,1; goto Change_Look; L_2: set .@view_change,2; goto Change_Look; Change_Look: if(!isequipped(24992)) end; //Make sure they have the item equipped setlook 3,getiteminfo(.lowerid[.@view_change],11); // Automaticly Call viewpoint of item that he said and setlook npctalk strcharinfo(0) + " has changed his Dyna Lower Look!"; end; } [/codeBOX]
  22. <p><p>Try This !! But I think What you want is If player have equiped 24992 they can change the look by saying id or name (in .@lowerid /.@lowername$) and his look will change to what he said right? gm.txt Ps. Why I can't use a codebox for this script
  23. From the picture you have to change getitename to getitemname in line 10;
×
×
  • Create New...