Jump to content

Ally Monster Summoner


SovietBR

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  20
  • Reputation:   1
  • Joined:  12/10/22
  • Last Seen:  

Hello everyone! I want to share my first script here so you guys can tell what you think of it!

How it works: The NPC will have a selection of random monsters, divide by a range of levels, from 1 to 9, 10 to 19 and so on. The player have to bring some itens and some zeny for the summoning, also, he has to be at the range level of the monster he wants to summon. 

The normal summons stay for 6 hours, and the  MvPs stay for 12h. 

The only thing I can't undo is the monster disapearing when the player logs out.

Let me know what do you guys think.

 

///////////////////SovietBR//////////////////////
prontera,168,328,4	script	Reginleif	811,{
	mes "[Reginleif, the Valkyrie]";
	mes "Hello!";
	mes "I have the power to summon monsters that can aid you in fights.";
	mes "They can be a little expensive, but you can summon as much as you need.";
	mes "Also, you need to be at the range level of the summon.";
	next;
	mes " Normal and mini bosses monsters stay with you for 6 hours.";
	mes " MvP stay for 12 hours.";
	mes " The cacth is, if you die or disconect, they disapear. Also, they can die in battle, so be carefull.";
	next;

    // Selection menu
    switch(select("Buy Scrolls","1 - 9","10 - 19","20 - 29","30 - 39","40 - 49","50 - 59","60 - 69","70 - 79","80 - 89","90-99","Mini-Boss","MvP")) {
        case 1:
            mes "Do you want to buy some healing scrolls";
            mes "You can use them on your summons.";
            mes "1000z each.";
            if (select("Yes, please!","No, thanks.") == 1) {
                // Prompt the player to enter the number of items
                mes "How many healing scrolls would you like to buy?";
                input .@amount; // Get the number of items the player wants
                if (.@amount < 1) {
                    mes "Please enter a valid amount.";
                    close;
                }
                set .@itemCost, 1500 * .@amount;
                if (Zeny < .@itemCost) {
                    mes "You do not have enough zeny.";
                } else {
                    // Deduct the zeny and give the items to the player
                    set Zeny, Zeny - .@itemCost;
                    getitem 12002, .@amount;
                    mes "You have purchased " + .@amount + " healing scroll(s).";
                }
                close;
            }
            break;
   
case 2:
    set .@zenyCost, 10000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 909, 916, 940; // Item IDs for required items
    setarray .@itemCostQty[0], 10, 20, 10, 940; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 2) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1002 360"; break;
                case 1: atcommand "@summon 1007 360"; break;
                case 2: atcommand "@summon 1063 360"; break;
                case 3: atcommand "@summon 1010 360"; break;
                case 4: atcommand "@summon 1051 360"; break;
                case 5: atcommand "@summon 1167 360"; break;
                case 6: atcommand "@summon 1052 360"; break;
                case 7: atcommand "@summon 1012 360"; break;
                case 8: atcommand "@summon 1004 360"; break;
                case 9: atcommand "@summon 1751 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 3: 
    set .@zenyCost, 20000; // Zeny cost for summon
    setarray .@itemCostID[0], 603, 932, 938, 921; // Item IDs for required items
    setarray .@itemCostQty[0], 20, 20, 20, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 10) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1076 360"; break;
                case 1: atcommand "@summon 1175 360"; break;
                case 2: atcommand "@summon 1070 360"; break;
                case 3: atcommand "@summon 1094 360"; break;
                case 4: atcommand "@summon 1024 360"; break;
                case 5: atcommand "@summon 1014 360"; break;
                case 6: atcommand "@summon 1162 360"; break;
                case 7: atcommand "@summon 1128 360"; break;
                case 8: atcommand "@summon 1077 360"; break;
                case 9: atcommand "@summon 1066 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;


case 4: 
    set .@zenyCost, 30000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 1019, 911, 934; // Item IDs for required items
    setarray .@itemCostQty[0], 30, 20, 15, 5; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 20) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1033 360"; break;
                case 1: atcommand "@summon 1114 360"; break;
                case 2: atcommand "@summon 1058 360"; break;
                case 3: atcommand "@summon 1784 360"; break;
                case 4: atcommand "@summon 1023 360"; break;
                case 5: atcommand "@summon 1122 360"; break;
                case 6: atcommand "@summon 1139 360"; break;
                case 7: atcommand "@summon 1106 360"; break;
                case 8: atcommand "@summon 1152 360"; break;
                case 9: atcommand "@summon 1028 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 5: 
    set .@zenyCost, 40000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 901, 996, 905; // Item IDs for required items
    setarray .@itemCostQty[0], 40, 20, 2, 20; // Quantities of required items

    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 30) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1026 360"; break;
                case 1: atcommand "@summon 1134 360"; break;
                case 2: atcommand "@summon 1188 360"; break;
                case 3: atcommand "@summon 1404 360"; break;
                case 4: atcommand "@summon 1165 360"; break;
                case 5: atcommand "@summon 1248 360"; break;
                case 6: atcommand "@summon 1045 360"; break;
                case 7: atcommand "@summon 1041 360"; break;
                case 8: atcommand "@summon 1151 360"; break;
                case 9: atcommand "@summon 1881 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 6: 
    set .@zenyCost, 50000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 994, 912, 510; // Item IDs for required items
    setarray .@itemCostQty[0], 50, 3, 30, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 40) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1140 360"; break;
                case 1: atcommand "@summon 1499 360"; break;
                case 2: atcommand "@summon 1776 360"; break;
                case 3: atcommand "@summon 1037 360"; break;
                case 4: atcommand "@summon 1102 360"; break;
                case 5: atcommand "@summon 1156 360"; break;
                case 6: atcommand "@summon 11383 360"; break;
                case 7: atcommand "@summon 1403 360"; break;
                case 8: atcommand "@summon 1065 360"; break;
                case 9: atcommand "@summon 1061 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 7: 
    set .@zenyCost, 60000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 7188, 7066, 938; // Item IDs for required items
    setarray .@itemCostQty[0], 60, 20, 10, 50; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 50) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1493 360"; break;
                case 1: atcommand "@summon 1257 360"; break;
                case 2: atcommand "@summon 1213 360"; break;
                case 3: atcommand "@summon 1410 360"; break;
                case 4: atcommand "@summon 1584 360"; break;
                case 5: atcommand "@summon 1778 360"; break;
                case 6: atcommand "@summon 1512 360"; break;
                case 7: atcommand "@summon 1131 360"; break;
                case 8: atcommand "@summon 1652 360"; break;
                case 9: atcommand "@summon 1655 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 8: 
    set .@zenyCost, 70000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 995, 1036, 997; // Item IDs for required items
    setarray .@itemCostQty[0], 70, 5, 20, 5; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 60) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1777 360"; break;
                case 1: atcommand "@summon 1154 360"; break;
                case 2: atcommand "@summon 1772 360"; break;
                case 3: atcommand "@summon 1314 360"; break;
                case 4: atcommand "@summon 1377 360"; break;
                case 5: atcommand "@summon 1385 360"; break;
                case 6: atcommand "@summon 1310 360"; break;
                case 7: atcommand "@summon 1382 360"; break;
                case 8: atcommand "@summon 1318 360"; break;
                case 9: atcommand "@summon 1717 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 9: 
    set .@zenyCost, 80000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 967, 1045, 702; // Item IDs for required items
    setarray .@itemCostQty[0], 80, 20, 50, 2; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 70) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1316 360"; break;
                case 1: atcommand "@summon 1201 360"; break;
                case 2: atcommand "@summon 1319 360"; break;
                case 3: atcommand "@summon 1769 360"; break;
                case 4: atcommand "@summon 1735 360"; break;
                case 5: atcommand "@summon 1098 360"; break;
                case 6: atcommand "@summon 1837 360"; break;
                case 7: atcommand "@summon 1366 360"; break;
                case 8: atcommand "@summon 1379 360"; break;
                case 9: atcommand "@summon 1219 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 10: 
    set .@zenyCost, 90000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 1036, 7326, 7347; // Item IDs for required items
    setarray .@itemCostQty[0], 90, 30, 10, 20; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 80) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1713 360"; break;
                case 1: atcommand "@summon 1867 360"; break;
                case 2: atcommand "@summon 1268 360"; break;
                case 3: atcommand "@summon 2016 360"; break;
                case 4: atcommand "@summon 2015 360"; break;
                case 5: atcommand "@summon 2021 360"; break;
                case 6: atcommand "@summon 1978 360"; break;
                case 7: atcommand "@summon 1635 360"; break;
                case 8: atcommand "@summon 1671 360"; break;
                case 9: atcommand "@summon 1286 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 11: 
    set .@zenyCost, 100000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 603, 6090; // Item IDs for required items
    setarray .@itemCostQty[0], 100, 10, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }
    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 90) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,6)) { 
                case 0: atcommand "@summon 1637 360"; break;
                case 1: atcommand "@summon 1634 360"; break;
                case 2: atcommand "@summon 1639 360"; break;
                case 3: atcommand "@summon 2024 360"; break;
                case 4: atcommand "@summon 1989 360"; break;
                case 5: atcommand "@summon 1992 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 12: 
    set .@zenyCost, 500000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 619, 7054, 7053, 7097, 994; // Item IDs for required items
    setarray .@itemCostQty[0], 100, 10, 50, 50, 50, 50;// Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }
    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 90) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,14)) { 
                case 0: atcommand "@summon 1093 360"; break;
                case 1: atcommand "@summon 1120 360"; break;
                case 2: atcommand "@summon 1096 360"; break;
                case 3: atcommand "@summon 1582 360"; break;
                case 4: atcommand "@summon 1388 360"; break;
                case 5: atcommand "@summon 1302 360"; break;
                case 6: atcommand "@summon 1830 360"; break;
                case 7: atcommand "@summon 1700 360"; break;
                case 8: atcommand "@summon 1754 360"; break;
                case 9: atcommand "@summon 1833 360"; break;
                case 10: atcommand "@summon 1918 360"; break;
                case 11: atcommand "@summon 1720 360"; break;
                case 12: atcommand "@summon 1831 360"; break;
                case 13: atcommand "@summon 1709 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 13: 
    set .@zenyCost, 5000000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 714, 994, 1022, 1015, 607, 724, 995, 996, 720, 725, 7005, 523, 7563, 1020, 7327, 526, 967, 7094, 603; // Item IDs for required items
    setarray .@itemCostQty[0], 500, 5, 20, 50, 50, 10, 2, 20, 20, 20, 10, 50, 10, 50, 50, 10, 10, 10, 5, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Those stay for 12 hours.";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 95) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,41)) { 
                case 0: atcommand "@summon 1086 720"; break;
                case 1: atcommand "@summon 1115 720"; break;
                case 2: atcommand "@summon 1150 720"; break;
                case 3: atcommand "@summon 1159 720"; break;
                case 4: atcommand "@summon 1112 720"; break;
                case 5: atcommand "@summon 1583 720"; break;
                case 6: atcommand "@summon 1492 720"; break;
                case 7: atcommand "@summon 1046 720"; break;
                case 8: atcommand "@summon 1418 720"; break;
                case 9: atcommand "@summon 1252 720"; break;
                case 10: atcommand "@summon 1059 720"; break;
                case 11: atcommand "@summon 1190 720"; break;
                case 12: atcommand "@summon 1251 720"; break;
                case 13: atcommand "@summon 1087 720"; break;
                case 14: atcommand "@summon 1038 720"; break;
                case 15: atcommand "@summon 1658 720"; break;
                case 16: atcommand "@summon 1272 720"; break;
                case 17: atcommand "@summon 1871 720"; break;
                case 18: atcommand "@summon 1039 720"; break;
                case 19: atcommand "@summon 1147 720"; break;
                case 20: atcommand "@summon 1785 720"; break;
                case 21: atcommand "@summon 1885 720"; break;
                case 22: atcommand "@summon 1630 720"; break;
                case 23: atcommand "@summon 1389 720"; break;
                case 24: atcommand "@summon 1623 720"; break;
                case 25: atcommand "@summon 1688 720"; break;
                case 26: atcommand "@summon 1768 720"; break;
                case 27: atcommand "@summon 1734 720"; break;
                case 28: atcommand "@summon 1719 720"; break;
                case 29: atcommand "@summon 2068 720"; break;
                case 30: atcommand "@summon 1157 720"; break;
                case 31: atcommand "@summon 1373 720"; break;
                case 32: atcommand "@summon 1312 720"; break;
                case 33: atcommand "@summon 1685 720"; break;
                case 34: atcommand "@summon 1779 720"; break;
                case 35: atcommand "@summon 1751 720"; break;
                case 36: atcommand "@summon 1650 720"; break;
                case 37: atcommand "@summon 1917 720"; break;
                case 38: atcommand "@summon 1647 720"; break;
                case 39: atcommand "@summon 1832 720"; break;
                case 40: atcommand "@summon 1751 720"; break;
            } 
            mes "You now have a demi-god by your side, make god use of him.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;                     
    }
    close;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 7 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/11/22
  • Last Seen:  

On 8/26/2024 at 5:31 PM, SovietBR said:

Hello everyone! I want to share my first script here so you guys can tell what you think of it!

How it works: The NPC will have a selection of random monsters, divide by a range of levels, from 1 to 9, 10 to 19 and so on. The player have to bring some itens and some zeny for the summoning, also, he has to be at the range level of the monster he wants to summon. 

The normal summons stay for 6 hours, and the  MvPs stay for 12h. 

The only thing I can't undo is the monster disapearing when the player logs out.

Let me know what do you guys think.

 

///////////////////SovietBR//////////////////////
prontera,168,328,4	script	Reginleif	811,{
	mes "[Reginleif, the Valkyrie]";
	mes "Hello!";
	mes "I have the power to summon monsters that can aid you in fights.";
	mes "They can be a little expensive, but you can summon as much as you need.";
	mes "Also, you need to be at the range level of the summon.";
	next;
	mes " Normal and mini bosses monsters stay with you for 6 hours.";
	mes " MvP stay for 12 hours.";
	mes " The cacth is, if you die or disconect, they disapear. Also, they can die in battle, so be carefull.";
	next;

    // Selection menu
    switch(select("Buy Scrolls","1 - 9","10 - 19","20 - 29","30 - 39","40 - 49","50 - 59","60 - 69","70 - 79","80 - 89","90-99","Mini-Boss","MvP")) {
        case 1:
            mes "Do you want to buy some healing scrolls";
            mes "You can use them on your summons.";
            mes "1000z each.";
            if (select("Yes, please!","No, thanks.") == 1) {
                // Prompt the player to enter the number of items
                mes "How many healing scrolls would you like to buy?";
                input .@amount; // Get the number of items the player wants
                if (.@amount < 1) {
                    mes "Please enter a valid amount.";
                    close;
                }
                set .@itemCost, 1500 * .@amount;
                if (Zeny < .@itemCost) {
                    mes "You do not have enough zeny.";
                } else {
                    // Deduct the zeny and give the items to the player
                    set Zeny, Zeny - .@itemCost;
                    getitem 12002, .@amount;
                    mes "You have purchased " + .@amount + " healing scroll(s).";
                }
                close;
            }
            break;
   
case 2:
    set .@zenyCost, 10000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 909, 916, 940; // Item IDs for required items
    setarray .@itemCostQty[0], 10, 20, 10, 940; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 2) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1002 360"; break;
                case 1: atcommand "@summon 1007 360"; break;
                case 2: atcommand "@summon 1063 360"; break;
                case 3: atcommand "@summon 1010 360"; break;
                case 4: atcommand "@summon 1051 360"; break;
                case 5: atcommand "@summon 1167 360"; break;
                case 6: atcommand "@summon 1052 360"; break;
                case 7: atcommand "@summon 1012 360"; break;
                case 8: atcommand "@summon 1004 360"; break;
                case 9: atcommand "@summon 1751 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 3: 
    set .@zenyCost, 20000; // Zeny cost for summon
    setarray .@itemCostID[0], 603, 932, 938, 921; // Item IDs for required items
    setarray .@itemCostQty[0], 20, 20, 20, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 10) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1076 360"; break;
                case 1: atcommand "@summon 1175 360"; break;
                case 2: atcommand "@summon 1070 360"; break;
                case 3: atcommand "@summon 1094 360"; break;
                case 4: atcommand "@summon 1024 360"; break;
                case 5: atcommand "@summon 1014 360"; break;
                case 6: atcommand "@summon 1162 360"; break;
                case 7: atcommand "@summon 1128 360"; break;
                case 8: atcommand "@summon 1077 360"; break;
                case 9: atcommand "@summon 1066 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;


case 4: 
    set .@zenyCost, 30000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 1019, 911, 934; // Item IDs for required items
    setarray .@itemCostQty[0], 30, 20, 15, 5; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 20) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1033 360"; break;
                case 1: atcommand "@summon 1114 360"; break;
                case 2: atcommand "@summon 1058 360"; break;
                case 3: atcommand "@summon 1784 360"; break;
                case 4: atcommand "@summon 1023 360"; break;
                case 5: atcommand "@summon 1122 360"; break;
                case 6: atcommand "@summon 1139 360"; break;
                case 7: atcommand "@summon 1106 360"; break;
                case 8: atcommand "@summon 1152 360"; break;
                case 9: atcommand "@summon 1028 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 5: 
    set .@zenyCost, 40000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 901, 996, 905; // Item IDs for required items
    setarray .@itemCostQty[0], 40, 20, 2, 20; // Quantities of required items

    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 30) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1026 360"; break;
                case 1: atcommand "@summon 1134 360"; break;
                case 2: atcommand "@summon 1188 360"; break;
                case 3: atcommand "@summon 1404 360"; break;
                case 4: atcommand "@summon 1165 360"; break;
                case 5: atcommand "@summon 1248 360"; break;
                case 6: atcommand "@summon 1045 360"; break;
                case 7: atcommand "@summon 1041 360"; break;
                case 8: atcommand "@summon 1151 360"; break;
                case 9: atcommand "@summon 1881 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 6: 
    set .@zenyCost, 50000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 994, 912, 510; // Item IDs for required items
    setarray .@itemCostQty[0], 50, 3, 30, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 40) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1140 360"; break;
                case 1: atcommand "@summon 1499 360"; break;
                case 2: atcommand "@summon 1776 360"; break;
                case 3: atcommand "@summon 1037 360"; break;
                case 4: atcommand "@summon 1102 360"; break;
                case 5: atcommand "@summon 1156 360"; break;
                case 6: atcommand "@summon 11383 360"; break;
                case 7: atcommand "@summon 1403 360"; break;
                case 8: atcommand "@summon 1065 360"; break;
                case 9: atcommand "@summon 1061 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 7: 
    set .@zenyCost, 60000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 7188, 7066, 938; // Item IDs for required items
    setarray .@itemCostQty[0], 60, 20, 10, 50; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 50) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1493 360"; break;
                case 1: atcommand "@summon 1257 360"; break;
                case 2: atcommand "@summon 1213 360"; break;
                case 3: atcommand "@summon 1410 360"; break;
                case 4: atcommand "@summon 1584 360"; break;
                case 5: atcommand "@summon 1778 360"; break;
                case 6: atcommand "@summon 1512 360"; break;
                case 7: atcommand "@summon 1131 360"; break;
                case 8: atcommand "@summon 1652 360"; break;
                case 9: atcommand "@summon 1655 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 8: 
    set .@zenyCost, 70000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 995, 1036, 997; // Item IDs for required items
    setarray .@itemCostQty[0], 70, 5, 20, 5; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 60) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1777 360"; break;
                case 1: atcommand "@summon 1154 360"; break;
                case 2: atcommand "@summon 1772 360"; break;
                case 3: atcommand "@summon 1314 360"; break;
                case 4: atcommand "@summon 1377 360"; break;
                case 5: atcommand "@summon 1385 360"; break;
                case 6: atcommand "@summon 1310 360"; break;
                case 7: atcommand "@summon 1382 360"; break;
                case 8: atcommand "@summon 1318 360"; break;
                case 9: atcommand "@summon 1717 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 9: 
    set .@zenyCost, 80000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 967, 1045, 702; // Item IDs for required items
    setarray .@itemCostQty[0], 80, 20, 50, 2; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 70) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1316 360"; break;
                case 1: atcommand "@summon 1201 360"; break;
                case 2: atcommand "@summon 1319 360"; break;
                case 3: atcommand "@summon 1769 360"; break;
                case 4: atcommand "@summon 1735 360"; break;
                case 5: atcommand "@summon 1098 360"; break;
                case 6: atcommand "@summon 1837 360"; break;
                case 7: atcommand "@summon 1366 360"; break;
                case 8: atcommand "@summon 1379 360"; break;
                case 9: atcommand "@summon 1219 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 10: 
    set .@zenyCost, 90000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 1036, 7326, 7347; // Item IDs for required items
    setarray .@itemCostQty[0], 90, 30, 10, 20; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 80) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,9)) { 
                case 0: atcommand "@summon 1713 360"; break;
                case 1: atcommand "@summon 1867 360"; break;
                case 2: atcommand "@summon 1268 360"; break;
                case 3: atcommand "@summon 2016 360"; break;
                case 4: atcommand "@summon 2015 360"; break;
                case 5: atcommand "@summon 2021 360"; break;
                case 6: atcommand "@summon 1978 360"; break;
                case 7: atcommand "@summon 1635 360"; break;
                case 8: atcommand "@summon 1671 360"; break;
                case 9: atcommand "@summon 1286 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 11: 
    set .@zenyCost, 100000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 603, 6090; // Item IDs for required items
    setarray .@itemCostQty[0], 100, 10, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }
    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 90) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,6)) { 
                case 0: atcommand "@summon 1637 360"; break;
                case 1: atcommand "@summon 1634 360"; break;
                case 2: atcommand "@summon 1639 360"; break;
                case 3: atcommand "@summon 2024 360"; break;
                case 4: atcommand "@summon 1989 360"; break;
                case 5: atcommand "@summon 1992 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 12: 
    set .@zenyCost, 500000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 619, 7054, 7053, 7097, 994; // Item IDs for required items
    setarray .@itemCostQty[0], 100, 10, 50, 50, 50, 50;// Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }
    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 90) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,14)) { 
                case 0: atcommand "@summon 1093 360"; break;
                case 1: atcommand "@summon 1120 360"; break;
                case 2: atcommand "@summon 1096 360"; break;
                case 3: atcommand "@summon 1582 360"; break;
                case 4: atcommand "@summon 1388 360"; break;
                case 5: atcommand "@summon 1302 360"; break;
                case 6: atcommand "@summon 1830 360"; break;
                case 7: atcommand "@summon 1700 360"; break;
                case 8: atcommand "@summon 1754 360"; break;
                case 9: atcommand "@summon 1833 360"; break;
                case 10: atcommand "@summon 1918 360"; break;
                case 11: atcommand "@summon 1720 360"; break;
                case 12: atcommand "@summon 1831 360"; break;
                case 13: atcommand "@summon 1709 360"; break;
            } 
            mes "Your new friend has been summoned.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;

case 13: 
    set .@zenyCost, 5000000; // Zeny cost for summon
    setarray .@itemCostID[0], 673, 714, 994, 1022, 1015, 607, 724, 995, 996, 720, 725, 7005, 523, 7563, 1020, 7327, 526, 967, 7094, 603; // Item IDs for required items
    setarray .@itemCostQty[0], 500, 5, 20, 50, 50, 10, 2, 20, 20, 20, 10, 50, 10, 50, 50, 10, 10, 10, 5, 10; // Quantities of required items

    // Display the cost to the player
    mes "To summon a monster, you will need:";
    mes "Those stay for 12 hours.";
    mes "Zeny: " + .@zenyCost;
    for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
        mes getitemname(.@itemCostID[.@i]) + ": " + .@itemCostQty[.@i];
    }

    if(select("Yes:No") == 1) {
        // Check if the player has enough zeny and items
        if (Zeny < .@zenyCost || countitem(.@itemCostID[0]) < .@itemCostQty[0] || countitem(.@itemCostID[1]) < .@itemCostQty[1] || countitem(.@itemCostID[2]) < .@itemCostQty[2] || BaseLevel < 95) {
            mes "You don't have enough zeny, items, or level.";
        } else {
            // Deduct zeny and items
            set Zeny, Zeny - .@zenyCost;
            for (set .@i, 0; .@i < getarraysize(.@itemCostID); set .@i, .@i + 1) {
                delitem .@itemCostID[.@i], .@itemCostQty[.@i];
            }

            // Summon the monster
            switch(rand(0,41)) { 
                case 0: atcommand "@summon 1086 720"; break;
                case 1: atcommand "@summon 1115 720"; break;
                case 2: atcommand "@summon 1150 720"; break;
                case 3: atcommand "@summon 1159 720"; break;
                case 4: atcommand "@summon 1112 720"; break;
                case 5: atcommand "@summon 1583 720"; break;
                case 6: atcommand "@summon 1492 720"; break;
                case 7: atcommand "@summon 1046 720"; break;
                case 8: atcommand "@summon 1418 720"; break;
                case 9: atcommand "@summon 1252 720"; break;
                case 10: atcommand "@summon 1059 720"; break;
                case 11: atcommand "@summon 1190 720"; break;
                case 12: atcommand "@summon 1251 720"; break;
                case 13: atcommand "@summon 1087 720"; break;
                case 14: atcommand "@summon 1038 720"; break;
                case 15: atcommand "@summon 1658 720"; break;
                case 16: atcommand "@summon 1272 720"; break;
                case 17: atcommand "@summon 1871 720"; break;
                case 18: atcommand "@summon 1039 720"; break;
                case 19: atcommand "@summon 1147 720"; break;
                case 20: atcommand "@summon 1785 720"; break;
                case 21: atcommand "@summon 1885 720"; break;
                case 22: atcommand "@summon 1630 720"; break;
                case 23: atcommand "@summon 1389 720"; break;
                case 24: atcommand "@summon 1623 720"; break;
                case 25: atcommand "@summon 1688 720"; break;
                case 26: atcommand "@summon 1768 720"; break;
                case 27: atcommand "@summon 1734 720"; break;
                case 28: atcommand "@summon 1719 720"; break;
                case 29: atcommand "@summon 2068 720"; break;
                case 30: atcommand "@summon 1157 720"; break;
                case 31: atcommand "@summon 1373 720"; break;
                case 32: atcommand "@summon 1312 720"; break;
                case 33: atcommand "@summon 1685 720"; break;
                case 34: atcommand "@summon 1779 720"; break;
                case 35: atcommand "@summon 1751 720"; break;
                case 36: atcommand "@summon 1650 720"; break;
                case 37: atcommand "@summon 1917 720"; break;
                case 38: atcommand "@summon 1647 720"; break;
                case 39: atcommand "@summon 1832 720"; break;
                case 40: atcommand "@summon 1751 720"; break;
            } 
            mes "You now have a demi-god by your side, make god use of him.";
        }
    } else {
        mes "Summoning cancelled.";
    }
    break;                     
    }
    close;
}

 

Can you make an NPC, who has a list of summons for the player to choose, which monster does he want in exchange for 1 item?

It looks like the same summoning system for 30 minutes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  3
  • Reputation:   0
  • Joined:  06/11/22
  • Last Seen:  

BPC can also summon as many monsters as you want, there is no limit.

Edited by anubs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...