Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/25/21 in all areas

  1. Hey @sader1992, In this bit (line 29), I think you mistakenly reused .@i where you could've used something else like .@j. It is, obviously, causing some problems when the categories have an item reward. if(getd(".IRD_" + .@i)){ for(.@i=0;.@i<getarraysize(getd(".IRD_" + .@i));.@i++){ getitem(getd(".IRD_" + .@i + "[" + .@i + "]"),getd(".CRD_" + .@i + "[" + .@i + "]")); } } I appreciate you rewriting this script, though. I find it more flexible than the previous version.
    1 point
  2. For the 2nd and third option you can use // Checks if the Turtle General Card is inside your inventory by seeing if the item count for the Item ID 4305 ( Turtle General Card ) is greater than zero. if(countitem(4305) > 0) { mes "Can't allow you to continue"; close; } // Checks if Equiped item has the turtle general card equiped for each individual slot ( 1-4 ) // If the ID of CARD SLOT of Equiped Item Position (2 = Weapon I believe ) is equal to 4035 ( Turtle General Card ID ) // I made it check all four card positions, First, Second, Third, and Fourth // If the the Equiped Item at Position 2 ( Weapon's Position ) Card Slot's Item ID is Equal to 4035 // I reworded this so that it matches the argument positions... if(getequipcardid(2,0) == 4305 || getequipcardid(2,1) == 4305 || getequipcardid(2,2) == 4305 || getequipcardid(2,3) == 4305) { mes "Can't allow you to continue"; close; } Script Command Information *getequipcardid(<equipment slot>,<card slot>) Returns value from equipped item slot in the indicated slot: getequipcardid(num,slot) where: num = equip position slot slot = 0,1,2,3 (Card Slot N) This func returns CARD ID, 255,254,-255 (for card 0, if the item is produced) it's useful when you want to check item cards or if it's signed. Useful for such quests as "Sign this refined item with players name" etc; Hat[0] +4 -> Player's Hat[0] +4 For your first one, you'd have to do an inventory check by using getinventorylist and have it check each individual item to see any of them has the card inside them. I think you would want to use these predefined arrays to search for them though. I'll test it myself later when I have time to see if it works. PREDEFINED ARRAYS @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific ---> Edit I managed to find time and test the script for the getinventorylist This will check all items in your inventory if they have a card inside the card slots that is a Turtle General Card ( Item ID 4305 ) // While .@i is less than the amount of items inside your inventory... // Check if any of the items has the item ID 4305 inside card position 1; // Same goes for the rest of the positions. // set .@i, .@i +1 to increment by one in value every time the while loop is run. ( 1... 2... 3... until value is GREATER than inventory count ) // The maximum times it will run is the amount of items you have inside your inventory. // Once the value of .@i is GREATER than the amount of items inside your inventory, // it'll break out of the loop and continue whatever additional script lines you add in. while ( .@i < @inventorylist_count ) { if (@inventorylist_card1[.@i] == 4305 || @inventorylist_card2[.@i] == 4305 || @inventorylist_card3[.@i] == 4305 || @inventorylist_card4[.@i] == 4305){ mes "Can't allow you to continue."; close; } set .@i, .@i + 1; } // Once loop is finished, it will continue here. mes "Thank you Evelynn (:"; close; Sorry for making you read all this if you did. I am trying to explain to you what is going on inside the script so that you will be able to learn for future use. Other than that, good luck (:.
    1 point
×
×
  • Create New...