DragonBlack94 2 Posted May 8, 2021 Share Posted May 8, 2021 Hi I have a problem I would like to create an item that when you click spaws a random boss among those chosen, can you help me? quest Carta_mostro begin state start begin when 50283.use begin say_title ( "Carta Mostro:") say ( "Questo e' la carta mostro, vuoi aprirla?" ) local yesno = select ( "Apri" , "Non aprire" ) pc.removeitem(50283,1) local dragon = number(1,4) local dragon1 = number(2,5) local dragon2 = {102,103,104,105} mob_vnum(dragon2[dragon],dragon1) end end end 1 Link to comment Share on other sites More sharing options...
Premium WeedHex 636 Posted May 8, 2021 Premium Share Posted May 8, 2021 You were going right but mob_vnum(dragon2[dragon],dragon1) you need spawn_mob function there. Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted May 8, 2021 Author Share Posted May 8, 2021 (edited) i already tried to spawn mob but it still doesn't work May 8 10:32:31 :: RunState: LUA_ERROR: [string "Carta_mostro"]:2: attempt to index global `spawn_boss' (a nil value) SYSERR: May 8 10:32:31 :: WriteRunningStateToSyserr: LUA_ERROR: quest Carta_mostro.start click SYSERR: May 8 10:40:00 :: mob_spawn_group: invalid argument SYSERR: May 8 10:40:00 :: SpawnMob: SpawnMob: no mob data for vnum 0 Edited May 8, 2021 by DragonBlack94 Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted May 10, 2021 Author Share Posted May 10, 2021 up Link to comment Share on other sites More sharing options...
Premium Syreldar 1890 Posted May 10, 2021 Premium Share Posted May 10, 2021 On 5/8/2021 at 11:14 AM, DragonBlack94 said: i already tried to spawn mob but it still doesn't work May 8 10:32:31 :: RunState: LUA_ERROR: [string "Carta_mostro"]:2: attempt to index global `spawn_boss' (a nil value) SYSERR: May 8 10:32:31 :: WriteRunningStateToSyserr: LUA_ERROR: quest Carta_mostro.start click SYSERR: May 8 10:40:00 :: mob_spawn_group: invalid argument SYSERR: May 8 10:40:00 :: SpawnMob: SpawnMob: no mob data for vnum 0 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
danhakhavro 42 Posted May 10, 2021 Share Posted May 10, 2021 Why dont you use special_item_group ? Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted June 24, 2021 Author Share Posted June 24, 2021 up pls Link to comment Share on other sites More sharing options...
DragonBlack94 2 Posted September 27, 2021 Author Share Posted September 27, 2021 up Link to comment Share on other sites More sharing options...
Forum Moderator Solution VegaS™ 10344 Posted September 27, 2021 Forum Moderator Solution Share Posted September 27, 2021 (edited) On 5/8/2021 at 11:47 AM, DragonBlack94 said: quest Carta_mostro begin state start begin when 50283.use begin say_title ( "Carta Mostro:") say ( "Questo e' la carta mostro, vuoi aprirla?" ) local yesno = select ( "Apri" , "Non aprire" ) pc.removeitem(50283,1) local dragon = number(1,4) local dragon1 = number(2,5) local dragon2 = {102,103,104,105} mob_vnum(dragon2[dragon],dragon1) end end end Try this: This is the hidden content, please Sign In or Sign Up Edited September 30, 2021 by VegaS™ 5 1 1 2 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts