Ridley 295 Posted July 25, 2016 File Name: Zodiac of the months File Submitter: Ridley File Submitted: 24 Jul 2016 File Category: Quest, Shops, Functions & Algorithms //===== Description: =========================================================//= Rotates each month. January (Capricorn) to December (Sagittarius)//= Counts and displays required items and how much you miss//= Player can choose to make diadem or crown//============================================================================ the sprites of the zodiac crowns/diadems are not in kro's data.grf, so I uploaded them here too. Click here to download this file 2 bWolfie and NevermoreInc reacted to this Quote Share this post Link to post Share on other sites
Lamex 8 Posted July 25, 2016 "You like to make 1 cancer" Yes pls Kappa 1 Ridley reacted to this Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 18, 2018 (edited) not working, got error [Error]: script error in file 'npc/custom/zodiac.txt' line 18 column 4 script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes. 15: next; 16: mes "[Zodiac of the Month]"; 17: mes "Would you like to make the Zodiac "+((.@Z==1)?"Diadem":"Crown")+" for the "+gettime(6)+"th Month of this year ?"; * 18: ((is_clientver(0,54))?"<ITEM>"+getitemname(.Zodiac[gettime(6)-1])+"<INFO>"+.Zodiac[gettime(6) -1]+"</INFO></ITEM>":"^FF0000"+getitemname (.Zodiac[gettime(6)-1])+"^000000"); ~~~~~~~~~~~~~~~~~~~~~~~~^ 19: next; 20: if(select("Yes:No") == 2) close; 21: switch(gettime(6)){ and so much error after edit that part. Edited July 18, 2018 by hendra814 Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted July 19, 2018 On 7/18/2018 at 11:54 AM, hendra814 said: not working, got error [Error]: script error in file 'npc/custom/zodiac.txt' line 18 column 4 script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes. 15: next; 16: mes "[Zodiac of the Month]"; 17: mes "Would you like to make the Zodiac "+((.@Z==1)?"Diadem":"Crown")+" for the "+gettime(6)+"th Month of this year ?"; * 18: ((is_clientver(0,54))?"<ITEM>"+getitemname(.Zodiac[gettime(6)-1])+"<INFO>"+.Zodiac[gettime(6) -1]+"</INFO></ITEM>":"^FF0000"+getitemname (.Zodiac[gettime(6)-1])+"^000000"); ~~~~~~~~~~~~~~~~~~~~~~~~^ 19: next; 20: if(select("Yes:No") == 2) close; 21: switch(gettime(6)){ and so much error after edit that part. The line you mentioned does not even exist in the script, download the new version and try. Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 19, 2018 4 minutes ago, Dastgir said: The line you mentioned does not even exist in the script, download the new version and try. sorry, i'm using the old one, but using the new script still got error Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted July 19, 2018 3 minutes ago, hendra814 said: sorry, i'm using the old one, but using the new script still got error Line 24 in script: mesf("Would you like to make 1 ^FF0000%s^000000 for the %dth Month of this year ?", getitemname (.Zodiac[gettime(6) -1]), (gettime(6))); It is mesf, I don't know how your script have mes command instead of mesf Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 19, 2018 6 minutes ago, Dastgir said: Line 24 in script: mesf("Would you like to make 1 ^FF0000%s^000000 for the %dth Month of this year ?", getitemname (.Zodiac[gettime(6) -1]), (gettime(6))); It is mesf, I don't know how your script have mes command instead of mesf ok, now got new error. Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted July 19, 2018 4 hours ago, hendra814 said: ok, now got new error. Problem is the item constant. Item constant cannot contain ' (which was allowed previously) most probably, just the ' is removed, so you can Replace "Goat's_Horn" with "Goats_Horn", however, you should double-check if constant exist in https://raw.githubusercontent.com/HerculesWS/Hercules/stable/db/re/item_db.conf (the AegisName field is the constant) 1 hendra814 reacted to this Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 20, 2018 14 hours ago, Dastgir said: Problem is the item constant. Item constant cannot contain ' (which was allowed previously) most probably, just the ' is removed, so you can Replace "Goat's_Horn" with "Goats_Horn", however, you should double-check if constant exist in https://raw.githubusercontent.com/HerculesWS/Hercules/stable/db/re/item_db.conf (the AegisName field is the constant) @Dastgir Thank you very much, it's working now. Spoiler //===== Hercules Script ====================================================== //= Quest for Zodiac Headgeards //===== By: ================================================================== //= Ridley //===== Current Version: ===================================================== //= 1.0 //===== Description: ========================================================= //= Rotates each month. January (Capricorn) to December (Sagittarius) //= Counts and displays required items and how much you miss //= Player can choose to make diadem or crown //============================================================================ prontera,155,181,5 script Zodiac#hats 4_F_PINKWOMAN,{ mes("[Zodiac of the Month]"); mes("Hello there, I am in charge of the Zodiac items. Please select which Zodiac item you are interested in."); if (select("Zodiac Diadem", "Zodiac Crown") == 1) { function Zodiac; setarray .Zodiac[0], Capricon_Diadem, Aquarius_Diadem, Pisces_Diadem, Aries_Diadem, Taurus_Diadem, Gemini_Diadem, Cancer_Diadem, Leo_Diadem, Virgo_Diadem, Libra_Diadem, Scorpio_Diadem, Sagittarius_Diadem; } else { function Zodiac; setarray .Zodiac[0], Capricon_Crown, Aquarius_Crown, Pisces_Crown, Aries_Crown, Taurus_Crown, Gemini_Crown, Cancer_Crown, Leo_Crown, Virgo_Crown, Libra_Crown, Scorpio_Crown, Sagittarius_Crown; } next; mes("[Zodiac of the Month]"); mesf("Would you like to make 1 ^FF0000%s^000000 for the %dth Month of this year ?", getitemname (.Zodiac[gettime(6) -1]), (gettime(6))); next; if (select("Yes", "No") == 2) close; switch (gettime(6)) { // (Item,Amount, Item,Amount,..); case 1: Zodiac("Rune_Of_Darkness",300, "Magestic_Goat",1, "Goat_Card",1, "Gaoat's_Skin",100, "Goats_Horn",100); break; case 2: Zodiac("Rune_Of_Darkness",300, "Aqua_Elemental_Card",1, "Crystalized_Teardrop",100, "Water_Of_Darkness",20, "Holy_Water",50); break; case 3: Zodiac("Rune_Of_Darkness",300, "Lip_Of_Ancient_Fish",100, "Fisherman's_Dagger",1, "Sword_Fish_Card",1, "Water_Of_Darkness",50); break; case 4: Zodiac("Rune_Of_Darkness",300, "Magestic_Goat",1, "Book_Of_Blazing_Sun_",1, "Gaoat's_Skin",100, "Goats_Horn",100); break; case 5: Zodiac("Rune_Of_Darkness",300, "Nose_Ring",100, "Hammer_Of_Blacksmith",10, "Majoruros_Card",1, "Minorous_Card",1); break; case 6: Zodiac("Rune_Of_Darkness",300, "Twinhorn_Helm",100, "Book_Of_Gust_Of_Wind_",1, "Rough_Wind",15, "Windhawk",1); break; case 7: Zodiac("Rune_Of_Darkness",300, "Nipper",100, "Crystal_Blue",50, "Solid_Shell",100, "Vadon_Card",1); break; case 8: Zodiac("Rune_Of_Darkness",300, "Tiger_Footskin",1, "Horn_Of_Hilsrion",100, "Hilsrion_Card",1, "Horn_Of_Hilthrion",1); break; case 9: Zodiac("Rune_Of_Darkness",300, "Skirt_Of_Virgin",1, "Kiss_Of_Angel",1, "Angel's_Arrival",1, "Angel's_Warmth",1, "Angel's_Safeguard",1, "Angel's_Protection",1, "Angelic_Chain",1); break; case 10: Zodiac("Rune_Of_Darkness",300, "Whip_Of_Balance",1, "Prohibition_Red_Candle",1, "Red_Feather",50, "Injustice_Card",1); break; case 11: Zodiac("Rune_Of_Darkness",300, "Scorpion_Card",1, "Scorpion's_Tail",100, "Scropion's_Nipper",100); break; case 12: Zodiac("Rune_Of_Darkness",300, "Piece_Of_Darkness",50, "Veteran_Axe",1, "Burning_Bow",1, "Burning_Heart",100); break; } mes("[Zodiac of the Month]"); mesf("Awesome! Here you go. You gained ^FF0000%s^000000 for this month!", getitemname (.Zodiac[gettime(6) -1])); getitem .Zodiac[gettime(6) -1], 1; close; function Zodiac { mes("[ ^0000FF Required Items ^000000 ]\r" "^FFFFFF________________________________^000000"); for (@i = 0; getarg(.@i, 0); .@i+=2) { mesf(((countitem(getarg(.@i)) < getarg(.@i + 1))?"^FF0000":"^0000FF")+"[ %d / %d ] ^0000FF%s^000000", countitem(getarg(.@i)), getarg(.@i + 1), getitemname(getarg(.@i))); if (countitem(getarg(.@i)) < getarg(.@i + 1)) .@j++; } mes("^FFFFFF________________________________^000000"); if (.@j) { mesf("[ ^FF0000Await completion for %d Items^000000 ]", .@j); close; } next; if (select("^FF0000Continue^000000", "Cancel") == 2) close; for(.@i = 0; getarg(.@i,0); .@i+=2) delitem getarg(.@i), getarg(.@i + 1); return; } } Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 23, 2018 (edited) @Dastgir, Sorry, getting error again,in game player could make the item without bring the item. and the required item not show in chat windows. Spoiler on map server show this error. Edited July 23, 2018 by hendra814 Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted July 23, 2018 Remove the quotes. Constant's are without quotes 1 hendra814 reacted to this Quote Share this post Link to post Share on other sites
hendra814 8 Posted July 24, 2018 (edited) 23 hours ago, Dastgir said: Remove the quotes. Constant's are without quotes already try change the script. after i remove the quote when load the script got error. okay here the lastest script works for hercules Spoiler //===== Hercules Script ====================================================== //= Quest for Zodiac Headgeards //===== By: ================================================================== //= Ridley //===== Current Version: ===================================================== //= 1.0 //===== Description: ========================================================= //= Rotates each month. January (Capricorn) to December (Sagittarius) //= Counts and displays required items and how much you miss //= Player can choose to make diadem or crown //============================================================================ prontera,155,181,5 script Zodiac#hats 4_F_PINKWOMAN,{ mes("[Zodiac of the Month]"); mes("Hello there, I am in charge of the Zodiac items. Please select which Zodiac item you are interested in."); if (select("Zodiac Diadem", "Zodiac Crown") == 1) { function Zodiac; setarray .Zodiac[0], Capricon_Diadem, Aquarius_Diadem, Pisces_Diadem, Aries_Diadem, Taurus_Diadem, Gemini_Diadem, Cancer_Diadem, Leo_Diadem, Virgo_Diadem, Libra_Diadem, Scorpio_Diadem, Sagittarius_Diadem; } else { function Zodiac; setarray .Zodiac[0], Capricon_Crown, Aquarius_Crown, Pisces_Crown, Aries_Crown, Taurus_Crown, Gemini_Crown, Cancer_Crown, Leo_Crown, Virgo_Crown, Libra_Crown, Scorpio_Crown, Sagittarius_Crown; } next; mes("[Zodiac of the Month]"); mesf("Would you like to make 1 ^FF0000%s^000000 for the %dth Month of this year ?", getitemname (.Zodiac[gettime(6) -1]), (gettime(6))); next; if (select("Yes", "No") == 2) close; switch (gettime(6)) { // (Item,Amount, Item,Amount,..); case 1: Zodiac(7511, 300, 2256, 1, "Goat_Card", 1, 7107, 100, 7106, 100); break; case 2: Zodiac(7511, 300, "Aqua_Elemental_Card", 1, "Crystalized_Teardrop", 100, "Water_Of_Darkness", 20, "Holy_Water", 50); break; case 3: Zodiac(7511, 300, "Lip_Of_Ancient_Fish", 100, "Fisherman's_Dagger", 1, "Sword_Fish_Card", 1, "Water_Of_Darkness", 50); break; case 4: Zodiac(7511, 300, 2256, 1, "Book_Of_Blazing_Sun_", 1, 7107, 100, 7106, 100); break; case 5: Zodiac(7511, 300, "Nose_Ring", 100, "Hammer_Of_Blacksmith", 10, "Majoruros_Card", 1, "Minorous_Card", 1); break; case 6: Zodiac(7511,300, "Twinhorn_Helm",100, "Book_Of_Gust_Of_Wind_",1, "Rough_Wind",15, "Windhawk",1); break; case 7: Zodiac(7511,300, 960,100, 991,50, 943,100, 4049,1); break; case 8: Zodiac(7511,300, "Tiger_Footskin",1, "Horn_Of_Hilsrion",100, "Hilsrion_Card",1, "Horn_Of_Hilthrion",1); break; case 9: Zodiac(7511,300, "Skirt_Of_Virgin",1, "Kiss_Of_Angel",1, "Angel's_Arrival",1, "Angel's_Warmth",1, "Angel's_Safeguard",1, "Angel's_Protection",1, "Angelic_Chain",1); break; case 10: Zodiac(7511,300, "Whip_Of_Balance",1, "Prohibition_Red_Candle",1, "Red_Feather",50, "Injustice_Card",1); break; case 11: Zodiac(7511,300, "Scorpion_Card",1, "Scorpion's_Tail",100, "Scropion's_Nipper",100); break; case 12: Zodiac(7511,300, "Piece_Of_Darkness",50, "Veteran_Axe",1, "Burning_Bow",1, "Burning_Heart",100); break; } mes("[Zodiac of the Month]"); mesf("Awesome! Here you go. You gained ^FF0000%s^000000 for this month!", getitemname (.Zodiac[gettime(6) -1])); getitem .Zodiac[gettime(6) -1], 1; close; function Zodiac { mes("[ ^0000FF Required Items ^000000 ]\r" "^FFFFFF________________________________^000000"); for (@i = 0; getarg(.@i, 0); .@i+=2) { mesf(((countitem(getarg(.@i)) < getarg(.@i + 1))?"^FF0000":"^0000FF")+"[ %d / %d ] ^0000FF%s^000000", countitem(getarg(.@i)), getarg(.@i + 1), getitemname(getarg(.@i))); if (countitem(getarg(.@i)) < getarg(.@i + 1)) .@j++; } mes("^FFFFFF________________________________^000000"); if (.@j) { mesf("[ ^FF0000Await completion for %d Items^000000 ]", .@j); close; } next; if (select("^FF0000Continue^000000", "Cancel") == 2) close; for(.@i = 0; getarg(.@i,0); .@i+=2) delitem getarg(.@i), getarg(.@i + 1); return; } } Edited July 24, 2018 by hendra814 Quote Share this post Link to post Share on other sites
Ridley 295 Posted August 22, 2018 Yes, sorry for that, those constants changed long ago, just need to check for the correct constants in item_db Quote Share this post Link to post Share on other sites