The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
NPC script Question: setarray with too many value, the npc script wont run ?
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
6ttctt9
Why setarray with too many value, the npc script wont run ?
This is NPC script, who will buy card from player with different price depend what is that card, like MVP card price 1 billion zeny and other is 100k or millions zeny.
with setarray just 1 or 2,3 value, the script run fine. but with many value each setarray, it wont run.
Example:
setarray .card100k,4032;//,4013,4023,4009,4004,4002,4026,4019,4006,4050,4008,4011,4001,4021,4022,4028,4016,4051; = it run
setarray .card100k,4032,4013,4023,4009,4004,4002,4026,4019,4006,4050,4008,4011,4001,4021,4022,4028,4016,4051; = it wont run.
prontera,181,204,4 script Card Buyer 658,{ mes "[Card Buyer]"; mes "You have any card to sell ? <3"; next; getinventorylist; for (; .@i < @inventorylist_count; .@i++) { if(getiteminfo(@inventorylist_id[.@i],2) == 6){ .@items[.@count] = @inventorylist_id[.@i]; .el = 0; for ( .@i2 = 0; .@i2 < getarraysize(.card100k); .@i2++ ) { if(@inventorylist_id[.@i] == .card100k[.@i2]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^00FF00100K Zeny^000000:"; .el = 1; } } for ( .@i3 = 0; .@i3 < getarraysize(.card500k); .@i3++ ) { if(@inventorylist_id[.@i] == .card500k[.@i3]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^00FF00500K Zeny^000000:"; .el = 1; } } for ( .@i4 = 0; .@i4 < getarraysize(.card5m); .@i4++ ) { if(@inventorylist_id[.@i] == .card5m[.@i4]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^0000FF5M Zeny^000000:"; .el = 1; } } for ( .@i5 = 0; .@i5 < getarraysize(.card10m); .@i5++ ) { if(@inventorylist_id[.@i] == .card10m[.@i5]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^0000FF10M Zeny^000000:"; .el = 1; } } for ( .@i6 = 0; .@i6 < getarraysize(.card50m); .@i6++ ) { if(@inventorylist_id[.@i] == .card50m[.@i6]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^0000FF50M Zeny^000000:"; .el = 1; } } for ( .@i7 = 0; .@i7 < getarraysize(.card100m); .@i7++ ) { if(@inventorylist_id[.@i] == .card100m[.@i7]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^FF0000100M Zeny^000000:"; .el = 1; } } for ( .@i8 = 0; .@i8 < getarraysize(.card500m); .@i8++ ) { if(@inventorylist_id[.@i] == .card500m[.@i8]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^FF0000500M Zeny^000000:"; .el = 1; } } for ( .@i9 = 0; .@i9 < getarraysize(.card1b); .@i9++ ) { if(@inventorylist_id[.@i] == .card1b[.@i9]) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^FF00001B Zeny^000000:"; .el = 1; } } if(.el == 0) { .@menu$ = .@menu$ + getitemname(@inventorylist_id[.@i]) + " ^00FF001M Zeny^000000:"; } .@count++; } } .@select = select(.@menu$) - 1; delitem .@items[.@select],1; .el = 0; for ( .@i2 = 0; .@i2 < getarraysize(.card100k); .@i2++ ) { if(.@items[.@select] == .card100k[.@i2]) { set Zeny, Zeny + 100000; .el = 1; } } for ( .@i3 = 0; .@i3 < getarraysize(.card500k); .@i3++ ) { if(.@items[.@select] == .card500k[.@i3]) { set Zeny, Zeny + 500000; .el = 1; } } for ( .@i4 = 0; .@i4 < getarraysize(.card5m); .@i4++ ) { if(.@items[.@select] == .card5m[.@i4]) { set Zeny, Zeny + 5000000; .el = 1; } } for ( .@i5 = 0; .@i5 < getarraysize(.card10m); .@i5++ ) { if(.@items[.@select] == .card10m[.@i5]) { set Zeny, Zeny + 10000000; .el = 1; } } for ( .@i6 = 0; .@i6 < getarraysize(.card50m); .@i6++ ) { if(.@items[.@select] == .card50m[.@i6]) { set Zeny, Zeny + 50000000; .el = 1; } } for ( .@i7 = 0; .@i7 < getarraysize(.card100m); .@i7++ ) { if(.@items[.@select] == .card100m[.@i7]) { set Zeny, Zeny + 100000000; .el = 1; } } for ( .@i8 = 0; .@i8 < getarraysize(.card500m); .@i8++ ) { if(.@items[.@select] == .card500m[.@i8]) { set Zeny, Zeny + 500000000; .el = 1; } } for ( .@i9 = 0; .@i9 < getarraysize(.card1b); .@i9++ ) { if(.@items[.@select] == .card1b[.@i9]) { set Zeny, Zeny + 1000000000; .el = 1; } } if(.el == 0) { set Zeny, Zeny + 1000000; } end; OnInit: //Ambernite,Andre Egg,Baby Desert Wolf,Chonchon,Drops,Fabre,Female Thief Bug,Hornet,Lunatic,Male Thief Bug,Picky,Picky Egg,Poring,Rocker,Spore,Tarou,Thief Bug,Yoyo setarray .card100k,4032;//,4013,4023,4009,4004,4002,4026,4019,4006,4050,4008,4011,4001,4021,4022,4028,4016,4051; //Andre,Condor,Elder Willow,Kukre,Pupa,Roda Frog,Thief Bug Egg,Willow,Wormtail setarray .card500k,4043;//,4015,4052,4027,4003,4014,4012,4010,4034; //Anubis,Beholder,Bigfoot,Bloody Butterfly,Bloody Knight,Cecil Damon,Creamy,Deviruchi,Dimik,Dragon Fly,Drosera,Eclipse,Egnigem Cenia,Eremes Guile,Enchanted Peach Tree,Executioner,Frilldora,Giant Whisper,Giearth,Goblin Leader,Gryphon,Horn,Horong,Howard Alt-Eisen,Joker,Kathryne Keyron,Khalitzburg,Kobold Leader,Loli Ruri,Marc,Marduk,Margaretha Sorin,Marine Sphere,Mastering,Medusa,Mutant Dragonoid,Mysteltainn,Nightmare,Obeaune,Ogretooth,Orc Warrior,Penomena,Phen,Pirate Skeleton,Poison Spore,Poporing,Rafflesia,Raydric,Seeker,Seyren Windsor,Sky Petite,Smokie,Soldier Andre,Stapo,Teddy Bear,Thara Frog,Toad,Ungoliant,Vagabond Wolf,Vitata,Vocal,Whisper,Zealotus setarray .card5m,4138,4356;//,4074,4327,4320,4368,4040,4122,4370,4179,4421,4266,4346,4360,4217,4250,4088,4303,4087,4155,4163,4045,4103,4362,4139,4366,4136,4291,4191,4105,4112,4364,4084,4197,4124,4203,4207,4127,4093,4254,4066,4314,4077,4073,4048,4033,4083,4133,4414,4358,4120,4044,4059,4424,4340,4058,4306,4336,4183,4053,4211,4102,4277; //Argiope,Banshee,Bathory,Bow Guardian,Despero of Thanatos,Dokebi,Dolor of Thanatos,Evil Druid,Hydrolancer,Imp,Kasa,Maero of Thanatos,Odium of Thanatos,Pasana,Salamander,Sandman,Siroma,Sword Guardian,Swordfish,Zerom setarray .card10m,4114;//,4438,4119,4428,4397,4098,4398,4141,4384,4433,4431,4395,4396,4099,4429,4101,4416,4427,4089,4064; //Abysmal Knight,Alice,Elder,Maya Purple setarray .card50m,4140;//,4253,4251,4198; //Angeling,Arc Angeling,Dark Illusion,Deviling,Ghostring setarray .card100m,4054;//,4241,4169,4174,4047; //Amon Ra,Atroce,Baphomet,Dark Lord,Detardeurus,Doppelganger,Dracula,Drake,Eddga,Evil Snake Lord,Fallen Bishop Hibram,General Egnigem Cenia,Gloom Under Night,Golden Thief Bug,Hatii,Kiel-D-01,Lady Tanee,Lord of The Dead,Maya,Mistress,Moonlight Flower,Orc Hero,Orc Lord,Osiris,Pharaoh,Phreeoni,RSX-0806,Samurai Spector,Stormy Knight,Tao Gunka,Turtle General,Vesper,White Lady setarray .card500m,4236,4425;//,4147,4168,4386,4142,4134,4137,4123,4330,4441,4352,4408,4128,4324,4403,4376,4276,4146,4132,4131,4143,4135,4144,4148,4121,4342,4263,4318,4302,4305,4374,4372; //Assassin Cross,Berzebub,Entweihen Crothen,High Priest,High Wizard,Ifrit,Ktullanux,Lord Knight,MasterSmith,Memory of Thanatos,Randgris,Sniper setarray .card1b,4359;//,4145,4451,4363,4365,4430,4419,4357,4361,4399,4407,4367; //All else : 1m end; }
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.