Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Euphy

  1. getitem .@ItemID[@Random],1; @Random is not defined (a typo for .@Random, I assume).
  2. - script sample -1,{ OnWhisperGlobal: input .@n$; if (!isloggedin(getcharid(3,.@n$),getcharid(0,.@n$)) { dispbottom "That character is not connected."; end; } attachrid(getcharid(3,.@n$)); mes "Message"; close; } To your second question: you can use 'setnpcdisplay' to change an NPC name.
  3. Why not use the script in the SVN...? trunk/npc/custom/healer.txt You have an end; before setting the delay variable.
  4. http://rathena.org/board/forum-32/announcement-10-script-request-rules/
  5. Basic_Scripting#Structure Header needs tabs, not spaces.
  6. // SetShop({#{,#{,...}}}); function SetShop { // Create the first, red menu options based on arguments passed. for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) { // Add each shop name, in order, to the menu. set .@menu$, .@menu$+"( ^FF0000"+.Shops$[getarg(.@i)]+"^000000 ):"; // Store shop number in an array to call later. // Has +1 to prevent skipping an element if 0 is passed (subtract 1 later). set .@j[getarraysize(.@j)], getarg(.@i)+1; // Set the bit for the shop number passed, so // that it doesn't get added twice (in the next loop). set .@k, .@k | (1<<getarg(.@i)); } // Create the other default, blue menu options. for(set .@i,0; .@i<getarraysize(.Shops$); set .@i,.@i+1) // Only run if the shop bit is NOT set, or // you'll get duplicates from the first loop. if (!(.@k & (1<<.@i))) { // Add each shop name to the menu. set .@menu$, .@menu$+"( ^0000FF"+.Shops$[.@i]+"^000000 ):"; // Store shop number in an array. set .@j[getarraysize(.@j)], .@i+1; } mes "[ ^0000FFWeapon Shop^000000 ]"; mes "Please choose your desired shop."; next; // Call shop based on menu option selected. // select(.@menu$)-1 : returns menu array element. // .@j[]-1 : array element in relation to .Shops$ array. // .Shops$[] : stores shop names. callshop .Shops$[.@j[select(.@menu$)-1]-1],1; close; }
  7. They're gender-based jobs. You can't be a male dancer or a female bard.
  8. What errors are you getting? Emistry and I have shops for this.
  9. The Thanatos quest got updated recently. The old script is available in SVN history.
  10. @Annie: Small mistake here: for ( .@i = 1; .@i <= 22; .@i++ ) { if ( .@i == 9 ) .@menu$ = .@menu$ +":"; // 'continue' would skip an array element else .@menu$ = .@menu$ +( ( .weaponbits[ .@job ] & 1 << .@i )? "^00FF00" : "^FF0000" )+ .weaponname$[ .@i ] +":"; } Great work though. o.o
  11. prt_in,172,140,3 script Weapon Shop 951,{ function SetShop; switch (BaseJob) { case Job_Priest: SetShop(4,5,10,7); case Job_Assassin: SetShop(0,13,1); case Job_Monk: SetShop(4,7); case Job_Sage: SetShop(5,10); case Job_Rogue: SetShop(0,1,6); case Job_Bard: SetShop(6,8,0); case Job_Dancer: SetShop(6,9,0); case Job_Gunslinger: SetShop(11); case Job_Ninja: SetShop(12); default: switch (BaseClass) { case Job_Novice: SetShop(0,1); case Job_Swordman: SetShop(1,2); case Job_Mage: SetShop(5); case Job_Archer: SetShop(6); case Job_Acolyte: SetShop(4,5); case Job_Merchant: SetShop(3,0,4,1); case Job_Thief: SetShop(0,6); default: SetShop(); } } function SetShop { for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) { set .@menu$, .@menu$+"( ^FF0000"+.Shops$[getarg(.@i)]+"^000000 ):"; set .@j[getarraysize(.@j)], getarg(.@i)+1; set .@k, .@k | (1<<getarg(.@i)); } for(set .@i,0; .@i<getarraysize(.Shops$); set .@i,.@i+1) if (!(.@k & (1<<.@i))) { set .@menu$, .@menu$+"( ^0000FF"+.Shops$[.@i]+"^000000 ):"; set .@j[getarraysize(.@j)], .@i+1; } mes "[ ^0000FFWeapon Shop^000000 ]"; mes "Please choose your desired shop."; next; callshop .Shops$[.@j[select(.@menu$)-1]-1],1; close; } OnInit: setarray .Shops$[0], "Daggers", // 0 "Swords", // 1 "Spears", // 2 "Axes", // 3 "Maces", // 4 "Wands", // 5 "Bows", // 6 "Knuckles", // 7 "Instruments", // 8 "Whips", // 9 "Books", // 10 "Guns", // 11 "Huuma and Kunai", // 12 "Katars"; // 13 end; } - shop Daggers -1,1203:-1,1201:-1,1202:-1,1206:-1,1204:-1,1205:-1,1209:-1,1207:-1,1208:-1,1212:-1,1210:-1,1211:-1,1215:-1,1213:-1,1214:-1,1218:-1,1216:-1,1217:-1,1221:-1,1219:-1,1220:-1,1222:-1,1226:-1,1245:-1,1246:-1,1247:-1,1248:-1,1249:-1,13000:-1,13003:-1,13004:-1 - shop Swords -1,1103:-1,1101:-1,1102:-1,1106:-1,1104:-1,1105:-1,1109:-1,1107:-1,1108:-1,1112:-1,1110:-1,1111:-1,1113:-1,1114:-1,1121:-1,1119:-1,1120:-1,1122:-1,1125:-1,1123:-1,1128:-1,1126:-1,1127:-1,1129:-1,1149:-1,1146:-1,1147:-1,1118:-1,1116:-1,1117:-1,1153:-1,1151:-1,1152:-1,1156:-1,1154:-1,1155:-1,1159:-1,1157:-1,1158:-1,1160:-1,1162:-1,1163:-1,31172:-1,1172:-1 - shop Spears -1,1403:-1,1401:-1,1402:-1,1406:-1,1404:-1,1405:-1,1409:-1,1407:-1,1408:-1,1411:-1,1453:-1,1451:-1,1452:-1,1456:-1,1454:-1,1455:-1,1459:-1,1457:-1,1458:-1,1462:-1,1460:-1,1461:-1,1465:-1,1463:-1,1464:-1 - shop Axes -1,1303:-1,1301:-1,1302:-1,1353:-1,1351:-1,1352:-1,1356:-1,1354:-1,1355:-1,1359:-1,1357:-1,1358:-1,1362:-1,1360:-1,1361:-1 - shop Maces -1,1503:-1,1501:-1,1502:-1,1506:-1,1504:-1,1505:-1,1509:-1,1507:-1,1508:-1,1512:-1,1510:-1,1511:-1,1519:-1,1520:-1,1521:-1,1513:-1,1514:-1,1515:-1,1516:-1,1517:-1,1518:-1,1522:-1,1532:-1 - shop Wands -1,1603:-1,1601:-1,1602:-1,1606:-1,1604:-1,1605:-1,1609:-1,1607:-1,1608:-1,1612:-1,1610:-1,1611:-1,1617:-1,1618:-1,1619:-1,1620:-1 - shop Bows -1,1703:-1,1701:-1,1702:-1,1706:-1,1704:-1,1705:-1,1709:-1,1707:-1,1708:-1,1712:-1,1710:-1,1711:-1,1713:-1,1715:-1,1714:-1,1716:-1,1726:-1,1721:-1 - shop Knuckles -1,1801:-1,1802:-1,1803:-1,1804:-1,1805:-1,1806:-1,1807:-1,1808:-1,1809:-1,1810:-1,1811:-1,1812:-1 - shop Instruments -1,1901:-1,1902:-1,1903:-1,1904:-1,1905:-1,1906:-1,1907:-1,1908:-1,1909:-1,1910:-1,1921:-1,1911:-1,1912:-1,1913:-1 - shop Whips -1,1950:-1,1951:-1,1952:-1,1953:-1,1954:-1,1955:-1,1956:-1,1957:-1,1958:-1,1959:-1,1960:-1,1961:-1,1963:-1 - shop Books -1,1550:-1,1551:-1,1552:-1,1553:-1,1568:-1,1554:-1,1569:-1,1570:-1,1556:-1,1571:-1,1557:-1,1578:-1 - shop Guns -1,13102:-1,13103:-1,13150:-1,13151:-1,13152:-1,13163:-1,13164:-1,13165:-1,13166:-1,13154:-1,13155:-1,13168:-1,13169:-1 - shop Huuma and Kunai -1,13010:-1,13011:-1,13007:-1,13008:-1,13012:-1,13013:-1,13006:-1,13300:-1,13301:-1,13302:-1,13303:-1,13311:-1,13313:-1,13314:-1,13315:-1,13312:-1 - shop Katars -1,1250:-1,1251:-1,1252:-1,1253:-1,1254:-1,1255:-1 http://upaste.me/raw/a5e71739a63abd83
  12. Add a variable and check for the player that completes the quest. set $@thana_summon, 5; + set $@thana_summon$, strcharinfo(0); donpcevent "#gateto_thanatos::OnEnable"; //... - if (.@touch) warp "thana_boss",136,116; + if (.@touch && strcharinfo(0) == $@thana_summon$) warp "thana_boss",136,116; else donpcevent "#gateto_thanatos::OnOn2";
  13. You should read the documentation. trunk/doc/script_commands.txt
  14. ... <spr>,<x>,<y>,{ OnTouch: if (<condition>) showevent <state>,<color>; end; }
  15. Euphy

    Quest Script

    Set a character variable after finishing the initial quest, check it before starting another. Basic_Scripting#Conditions.2C_Variables.2C_and_Set
  16. Euphy

    Card list

    Don't delete them from item_db, as it'll give you mob_db drop errors. Find the IDs of the cards you want disabled, then find&replace ,card_id,1 with ,card_id,0 in mob_db (or copy out the entries to mob_db2 and do the same).
  17. Euphy

    Error occur

    If you read the error message, it should be obvious. ...goto EndEvent; // This label doesn't exist.
  18. @Goddameit: If you use item type 11 (delayed consumable), you won't have to 'getitem' each time you use a direction item.
  19. Euphy

    Custom Fly Wing

    Check against the "No Teleport" mapflag: { if (getmapflag(strcharinfo(3),mf_noteleport)) dispbottom "Unable to warp on this map."; else warp strcharinfo(3),0,0; },{},{}
  20. Please use the Bug Tracker to report any bugs you find. Thank you!
  21. No, shop data can't be read off anything defined as a "script".
  22. You have to make a standard shop NPC (it can be invisible), then call it from a script:
×
×
  • Create New...