Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 05/22/2024 in all areas

  1. 1 point
    i think u can use the same function, just changing the mobs respawn, in CA respawn every 60 seconds, if u want to kill x mob and didnt respawn, something like: function map_copy_run_special_MapName( map_copy ) Every_5_minute = Every_5_minute+1 if Every_5_minute == 2 then -- Time for spawn mobs when maze open (in this case when have past 2 mins) local Monster2 = CreateChaEx(MobID, XX00, YY00, 180, RespawnTime,map_copy) SetChaLifeTime(Monster2,299050) if Every_5_minute == 3 then local Monster3 = CreateChaEx(MobID, XX00, YY00, 180, RespawnTime,map_copy) SetChaLifeTime(Monster3,299050) if Every_5_minute == 4 then local Monster4 = CreateChaEx(MobID, XX00, YY00, 180, RespawnTime,map_copy) SetChaLifeTime(Monster4,299050) end this funcion make the previous wave disappear and stop respawning, or idk what u want to do, just have to change the map name and adding to the file ctrl.lua of that map
  2. 1 point
  3. 1 point
    Hello @ZankzaMods, This is a bug in GroupServer .exe. It needs to be patched. Please send me your GroupServer.
  4. 1 point
    Project files for sale Talesofpirates.net What is included? - Client (Visual Studio v2022); - Server (Visual Stidio v2013); - A set of own tools for working on the server/client; Game client (this is a small list of things you should pay attention to): - Supports multilingualism (you can change the language without rebooting the client); - Russian language support; - OpenSSL support; - Json support; - Inside there is also a ready-made launched launcher mechanism (you need to add the logic); - Saving logins; - Encryption of files and textures; - Protection against monster substitution; - There are absolutely no bugs that interfere with the game; *The client has two glitches related to DX8 (does not appear on all devices), you need to move to at least DX9; - Fully working 60 FPS, with the ability to enable 30 FPS at the compilation stage; - The effects work has been refactored (the client works more stably under heavy load); - Turn on and off yellow bags on the ground; - Encryption has been changed, several sections have been added at the authorization stage - protection against client substitution; - There is drop info for monsters; - Rating tables have been written (information can be taken both from the server and from a web resource via json); - Mount system with the ability to upgrade to any stat; - Fixed all bugs with wings; - No memory leaks (everything I found was fixed); - A significant part of the code works on smart pointers; Sub-servers (Account,Gate,Group,Game) (also not a complete list, only what I could remember): - Fixed crashes of subservers; - Lack of disconnects; - Complete absence of backdoors and vulnerabilities; - The server supports 7,500 simultaneous connections, instead of the standard 1,500; - All previously known bugs have been fixed, everything is playable out of the box; - Manual pets with customizable loot filter (can be implemented either through your website or configured to work on the server, everything works in real time); - Adequate operation of Item-Mall, now it works on the basis of a database, and you can make changes in real time (I also added some features in the form of setting some limits on purchases by time or number of goods); - You can set in lua, save the effect when the player dies, or not (flexible condition), in the AddState function you need to set true or false, respectively, everything is cached in the database; - Working captcha code (anti-bot), I wrote all its logic and work in lua; - I will give away the resource included with the server; - Quite a lot of interesting features are implemented in lua-sdk itself; - There are various new auxiliary functions that were not previously available in Lua, for example, creating chests with random drops is easier to create, you don’t need to write a lot of conditions; - Implemented land fishing with fishing rods and fish)); - New peaceful skill "Alchemy"; - The mechanism of how gems work has been put in order, now all conditions are set in one line and in a readable form; - Implemented the function of auto-rates based on timing; - Full rental of any items has been implemented; - Fully working version of the “Balance” dungeon; - Daily reward system; - Implemented blocking of the player (not the game account, but the computer); - The ability to transfer items/imps to the player’s backpack in real time (for example, through the website); - Full premium account; You can find out more about everything by simply going to my server and testing what I offer; I will answer any questions you haven’t found. Important about guarantees: - If someone finds a vulnerability in the files sold that is not on my server talesofpirates.net, I will return your money in full; - When purchasing, you receive full support from me, as a developer and author - an unlimited amount of time (it is important to understand that I will not work for you, but I will be happy to answer questions about the mechanics of the work or what and how it works) ; And now the main thing is the cost of this kit. I cannot estimate the cost, because if you have opened the source code at least once, you should understand how much work needs to be done for the server to at least work stably. Therefore, if you have the desire and opportunity to purchase this kit, do not hesitate to write me your offer in telegram @e1mer If necessary, if your proposal suits me completely, I will take care of protection against DDoS attacks, I have solutions that you can also test. I am not leaving the community and my server continues to operate.
  5. 1 point
    [ALPHA] Piratia Deep Ocean 1.38 ENG+RUS Описание Начальный кап: 45 Фея: 51 Рейты сервера: Соло - х3 Пати - х3 Дроп - х10 Фея - х25 Локации Кристальный берег - стартовый и пока что основной регион Шахты Затерянный город 1,2,3 (35-45 лвл, время работы Каждые 3 часа, начиная с 00:00) Остров Сокровищ Серебряный Хаос (Время работы каждые 6 часов, 4 раза в сутки, начиная с 14:00) Ссылка на телеграм канал, где будут выходить новости и дополнительные описания: https://t.me/+Bt_oKgor14M4MjJi Немного обо мне: Я впервые запускаю сервер - пробую свои силы и знания, поэтому хочу реализовать свои хотелки и идеи в нашей любимой игре, также я подумал, что это отличный плацдарм для того, чтобы набраться опыта в программировании. Контент: Кап и контент будет вводиться постепенно. За частоту обновлений много обещать не буду, но как смогу, так сразу. В планах: Создать свой сюжет Создать новые локации и поработать со старыми локациями Создать новые и добавить уже всем знакомые фишки и механики Создать платформу для администрирования сервера Создать веб портал для моего сервера О глобальных изменениях будут дублировать здесь в комментариях
  6. 1 point
    Продолжаем расти и смотреть на все наши системы. Уже сотни игроков зашли и насладились нашей игрой. Присоединяйся!
  7. 1 point
    u should guard it with nil check or using or to avoid updateall replacing easier check to use PZW[1] = 0 or PZW[1]
  8. 1 point
    Пожертвования на содержание сайта Всем привет! Несколько недель назад администратор @Panda продлил домен и хостинг для функционирования нашего сайта в 2024 - 2025 годах. Средства на инфраструктуру для форума он взял из своего личного бюджета. В связи с этим предлагаю сгладить его материальные затраты и поддержать его финансово, как мы это делали в прошлом и позапрошлом годах. Если Вам нравится наш форум и Вы находите его полезным и интересным для себя, и хотите его поддержать, то пожалуйста, напишите об этом в данной теме, либо в наши ЛС (@V3ct0r, @Panda), или мне в Discord (v3ct0r1024). Пользователи, которые поддержали форум: @Дракан (2800р); @Sultan; @GlennFiddicher (1500р). Спасибо за внимание!
  9. 1 point
    Привет! Посмотрел твое последнее новостное видео, где ты рассказал про свои идеи по этим вопросам. Благодарю за ответ! P.S. Слежу за твоими проектами и желаю успехов в разработке.
  10. 1 point
    Preorders will have 20% discount. All my paid mods come with licenses, so rest assured that you won't buy a leaked mod.
  11. 1 point
  12. 1 point
    Такс, обновил первую тему, запуск 25 мая Канал теперь один, регистрация через бота в телеграмме Прошу пожаловать, подписывайтесь на канал, скоро там будет клиент с автопатчером
  13. 1 point
    Привет ) 1) Опасения нормальные, да, но в случае развития AI генерации картинок, большинство контента и его генерации на основе того, что есть в клиенте я просто автоматизирую И скорее я скомбинирую эти 2 момента, так как Godot позволяет это делать. То, что можно экспортировать - я экспортирую, а остальное в 2.5D, для упрощения конечно же 2) В случае с Пиратией это не особо будет затыком, мне нравится идея стандартизации протокола, который можно использовать повсюду и со всех языков без дополнительного оверхеда на ее реализацию, json позволяет гибкое манипулирование, а пошаговая база игры не сильно и требовательна к самому протоколу, как таковому. Прикину, потестирую, побенчмаркаю и там поглядим
  14. 1 point
    "Поиск по файлам" в текстовом редакторе? Или же в файлах по пути: /resource/карта/monsterconf И resource\script\monster
  15. 1 point
    @Daxter Detours is the library that enables the pkomod loader. It allows you to hook functions and call your own functions instead, so you could hook, among other things, the function that opens up the bank UI - and show the account bank UI instead. This is just an example, ofc, it would take a lot more effort.
  16. 1 point
    Bueno en esta guia veremos como instalar sql server 2022 nada de 2003 y 2005 que estan muy viejos XD Lo primero sera ir a su web https://www.microsoft.com/es-cl/sql-server/sql-server-downloads y descargar el exe Una ves Descargado ejecutamos SQL2022-SSEI-Expr.exe y Seleccionaremos Descargar Medios Por alguna rason en los windows en español da un error la version ES Si que pondremos ingles elejimos la version express advanced y donde guardaremos el archivo y le damos a descargar Una ves Descargado Podemos cerrar y ejecutamos SQLEXPRADV_x64_ENU.exe aca la primera para instalar una nueva instance Aceptamos Los terminos y next No Usare las actualizaciones y next nos fijamos que que todos esten correctos aveses da error en el firewall pero es por que no lo e configurado es solo una advertencia y next No Usare Azure ya que nose que es y next verificcamos que tengamos las opciones marcadas y next esta parte es muy importante es el nombre dela instance si que no usaremos default y marcaremos la de abajo y definiremos un nombre para nuestro server y next nunca e configurado esta parte si que le damos next esta parte es muy importante definiremos la seguridad del usuario sa si que pondremos mixed mode y crearemos una contraseña de texto plano (sin encriptar) con maximo de 16 caracteres para evitar un bug en la encryptacion dela contraseña que veremos mas adelante en la seccion de servidor y next Una ves todo terminado veras que se instalo todo correctamente ya con estop tendremos el motor instalado ahora nesesitaremos el manager selecionaremos install sql server manager Buscaremos download SSMS y descargamos el exe una ves descargado ejecutaremos SSMS-Setup-ENU.exe esto es facil solo das install y cuando termine de instalar le daremos close ya con esto tendremos sql 2022 instalo y funcionando Ahora Crearemos la DataBase si que tendremos que abrir SSMS Tomaremos Nota Server Name Anotarlo en un texto y nos logearemos con el user sa y pondremos la contraseña en texto plano y conectaremos ana ves conectado selecionamos databases click derecho y new database Ahora en database name Le Pondremos AccountServer buscaremos la ruta donde guardaremos la DB yo pordefecto cree una carpeta llamada Server/Db/ y le daremos Ok Repetimos El proceso pero con GameDB Ya con esto deveriamos tener nuestras databases limpias pero sin datos -.-!! si que tendremos que crear las tablas y para eso les dejare un script para crear todo selecionamos New Query Copiaremos el contenido de InstalDB.sql en la nueva ventana en la parte final estan los datos para crear una cuenta GM solo deves modificar el nombre contraseña en formato (MD5) luego la contraseña en texto plano y tu correo en la linea de abajo id nombre y gm level una ves configurada tu cuenta de juego le damos en ejecutar script ya con esto deverian crearse las tablas y una cuenta GM y te deveria salir lo sigiente para estar correcto ahora crearemos el usuario para el servidor si que selecionamos security -> Logins click derecho y le damos a New Login iremos a general y Configuraremos nuestra cuenta en login name pondremos nuestro usuario que manejara el server selecionamos sql server authentication y segido nuestra contraseña en texto plano y desactivamos enforce password policy ahora iremos a user mapping seleccionamos nuestras DB AccountServer y marcaremos DB Owner,DB datareader,DB datawriter repetimos lo mismo con GameDB y le damos OK Ya con Esto tendremos nuestro usuario para usarlo en el servidor bueno con esto terminamos la primera parte y pronto traere la parte del servidor
  17. 1 point
    Today I will explain about how you may add a new fairy. As an example, you can use the Dragon Fairy Files from this archive. https://mega.nz/folder/OUMUgTYb#jtCsqh7halK_O9uzWyaG0g/folder/KcdVQK6a Add all the included item for client side into client. Add iteminfo.txt and then compiled it for client bin. Add '0' with tab after description depend on your iteminfo files version. Example here already have it. XXXX Dragon Spirit n1921 10130005 0 0 0 0 0 0 59 0 0 0 0 0 1 1 1 1 1 1 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 10,10 0 240,240 5000,5000 0 0 0 0 0 0 0 0 0 0 0 0 0 YYYY,0 0 0 Dragon Fairy. 0 Place this with sceneffectinfo.txt and compile it for client bin. YYYY xhlgua.par Dragon Class Sea Wave 1 0 0 -1 0 0 0 -1 XXXX = iteminfoID YYYY = SceneffectinfoID -- replace also this inside the iteminfo.txt for dragon spirit. Basically this is already a complete way to add a new model of fairy but you will not get the fairy effect or even possession fairy skill. This guide I made only the portion where the check for pet marriage is ignored. ( Can find in other forum about this check, mine already removed if I'm not mistaken ). Open skilleffect.lua and find this " Skill_JLFT_End ( ATKER , DEFER , sklv ) " Try to make the equation after this code local Item_ID = GetItemID ( item_elf ) With this code if Item_ID==231 then AddState( ATKER , ATKER , STATE_JLFT1, statelv , statetime ) elseif Item_ID==232 then AddState( ATKER , ATKER , STATE_JLFT2, statelv , statetime ) elseif Item_ID==233 then AddState( ATKER , ATKER , STATE_JLFT3, statelv , statetime ) elseif Item_ID==235 then AddState( ATKER , ATKER , STATE_JLFT4, statelv , statetime ) elseif Item_ID==234 then AddState( ATKER , ATKER , STATE_JLFT5, statelv , statetime ) elseif Item_ID==236 then AddState( ATKER , ATKER , STATE_JLFT6, statelv , statetime ) elseif Item_ID==237 then AddState( ATKER , ATKER , STATE_JLFT7, statelv , statetime ) elseif Item_ID==681 then AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime ) elseif Item_ID==500 or Item_ID == 7362 or Item_ID == 7363 or Item_ID == 7364 or Item_ID == 7365 or Item_ID == 7353 then AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime ) The default pet in most iteminfo.txt only have 231 until 500, the other ID mentioned here is based on your custom iteminfoID for your fairy. This function declared a state for the respected fairy. Find State_JLFT_Add ( role , sklv ) and below this code local Part7 = GetNum_Part7 ( Num_JL ) add this code or make it similar to this code. if Part1 == 1 then local star = 0 local statelv = lv_JL * 0.025 * (sklv + 1) * 0.05 ----lv*1/40*(skilllv+1)/2*0.1 if Item_ID ==232 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_STR) end if Item_ID ==233 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_CON) end if Item_ID ==234 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_STA) end if Item_ID ==235 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_DEX) end if Item_ID ==236 then local star = lv_JL SetCharaAttr(star ,role , ATTR_STATEV_AGI) end if Item_ID == 681 or Item_ID == 231 or Item_ID == 237 then if str~=nil and str~=0 then SetCharaAttr(str ,role , ATTR_STATEV_STR) end if con~=nil and con~=0 then SetCharaAttr(con ,role , ATTR_STATEV_CON) end if sta~=nil and sta~=0 then SetCharaAttr(sta ,role , ATTR_STATEV_STA) end if dex~=nil and dex~=0 then SetCharaAttr(dex ,role , ATTR_STATEV_DEX) end if agi~=nil and agi~=0 then SetCharaAttr(agi ,role , ATTR_STATEV_AGI) end end if Item_ID == 500 or Item_ID == 7362 or Item_ID == 7363 or Item_ID == 7364 or Item_ID == 7365 or Item_ID == 7353 then -- august pet 1 4 dan dragon pet if str~=nil and str~=0 then local star = str*1.2 SetCharaAttr(star ,role , ATTR_STATEV_STR) end if con~=nil and con~=0 then local star = con*1.2 SetCharaAttr(star ,role , ATTR_STATEV_CON) end if sta~=nil and sta~=0 then local star = sta*1.2 SetCharaAttr(star ,role , ATTR_STATEV_STA) end if dex~=nil and dex~=0 then local star = dex*1.2 SetCharaAttr(star ,role , ATTR_STATEV_DEX) end if agi~=nil and agi~=0 then local star = agi*1.2 SetCharaAttr(star ,role , ATTR_STATEV_AGI) end local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.05 --asal 0.02 local star2 = GetChaAttr( role, ATTR_BMF ) SetCharaAttr(star ,role , ATTR_BMF) local star = GetChaAttr( role, ATTR_STATEV_PDEF ) + 3 SetCharaAttr(star ,role , ATTR_STATEV_PDEF) end end end ALLExAttrSet(role) end As previously mentioned, the additional iteminfoID for new fairy is added in such a way to declared the stats changes by multiplier. In my case the stats is 1.2 more than normal possession for certain pet. local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.05 This part is the declaration part of drop rate during possession multiplier. You can play with the values but advise it to be low if you have higher level pet to ensure the drop rate is not too high if you aim for medium setting server. You can place this also with other fairy ID above since its a local declaration, you can simply called it with the same variables without conflict. Note to take, make sure all your fairyID have the same itemtype 59. Credit to the script owner or any contributor to the script. I simply sort it out for guides.
  18. 1 point
    Hi PKODev! ; I bring you a Guide .. rather a script that will guide you to many people who are embarking on the development of private servers! function ItemUse_Example27( role, Item ) local GemSlotAID3 = 15 -- Gem Stone ID A ( Can be founded in stoneinfo.txt ) local GemSlotBID3 = 29 -- Gem Stone ID B ( Can be founded in stoneinfo.txt ) local GemSlotCID3 = 22 -- Gem Stone ID C ( Can be founded in stoneinfo.txt ) local GemSlotALevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotBLevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotCLevel3 = 9 -- Gem Level - 1 ~ 9 r13,r23 = MakeItem(role,####,1,18)-- Your Equip local Equipp3 = GetChaItem(role,2,r23) local param3 = GetItemForgeParam(Equipp3,1) local Item_Stone3 = {} local Item_StoneLv3 = {} param3 = TansferNum(param3) Item_Stone3[0] = GetNum_Part2(param3) Item_StoneLv3[0] = GetNum_Part3(param3) Item_Stone3[0] = GemSlotAID3 Item_StoneLv3[0] = GemSlotALevel3 param3 = SetNum_Part2(param3, Item_Stone3[0]) param3 = SetNum_Part3(param3, Item_StoneLv3[0]) SetItemForgeParam(Equipp3, 1, param3) param3= TansferNum(param3) Item_Stone3[1] = GetNum_Part2(param3) Item_StoneLv3[1] = GetNum_Part3(param3) Item_Stone3[1] = GemSlotBID3 Item_StoneLv3[1] = GemSlotBLevel3 param3 = SetNum_Part4(param3, Item_Stone3[1]) param3 = SetNum_Part5(param3, Item_StoneLv3[1]) SetItemForgeParam(Equipp3, 1, param3) param3 = TansferNum(param3) Item_Stone3[2] = GetNum_Part2(param3) Item_StoneLv3[2] = GetNum_Part3(param3) Item_Stone3[2] = GemSlotCID3 Item_StoneLv3[2] = GemSlotCLevel3 param3 = SetNum_Part6(param3, Item_Stone3[2]) param3 = SetNum_Part7(param3, Item_StoneLv3[2]) SetItemForgeParam(Equipp3, 1, param3) local Socket3 = GetItemForgeParam(Equipp3, 1) Socket3 = TansferNum(Socket3) Socket3 = SetNum_Part1(Socket3, 3) SetItemForgeParam(Equipp3, 1, Socket3) RefreshCha(role) end
  19. 1 point
    Tool for compressing .map files When working with the YAMMI map editor, there may be a problem that the output .map file will be very large. For example, if you open the map darkblue.map (Deep Blue) in YAMMI and save it to disk, then the size of the map will be about 240 MB, instead of the original 46 MB! This is due to the fact that most of the darkblue map is occupied by the sea, i.e. essentially the same cells that do not differ from each other, and such cells do not need to be written to the .map file - the game client will automatically replace them with water when rendering, but YAMMI does not use this optimization and still writes "empty" cells to the output .map file. This tool solves the problem described above and allows you to significantly reduce the size of .map files on disk after they have been edited in YAMMI. To do this, the program looks for "empty" cells in the .map file and removes them from the file. Download 1) The tool (pkodev.tool.mapcompressor.exe); 2) Source code (C++). The tool is a console program, so the paths to the source and output .map files are passed through the startup parameters: > pkodev.tool.mapcompressor darkblue.map darkblue_c.map darkblue.map is the uncompressed .map file that needs to be reduced; darkblue_c.map is a compressed .map file after being processed by the program. The output of the program will be something like this: PKOdev.NET .map file compressor program Version: v1.0.0 (03/01/2022) Author: V3ct0r Input .map file: darkblue.map Output .map file: darkblue_c.map Input .map file information: * Width: 4096 * Height: 4096 * Section width: 8 * Section height: 8 * Sections number: 262144 Please wait . . . Done! * Sections compressed: 222007 * Percentage: 84.69% * Bytes freed: 213126720 As you can see from the output, the size of the .map file has been reduced by about 203 MB! Attention! At the moment, the program has not yet been properly tested, so after compression, certain errors may occur on the maps. Keep this in mind when working and keep backup copies of the original .map files.
  20. 1 point
    EXPLAINATION: I was playing around with some lua scripts and functions and wanted to share this script with you. It is a slot machine NPC, which allows you to play a game for fairy coins and money. Everytime you play, there are three wheels with four rows that show randomized slots. If you get three of the same slots in one row, you win a prize. Prizes can be easily customized and also the costs to play this game. Enjoy! SCREENSHOT: THE FUNCTION: \resource\script\calculate\functions.lua slotmachine = {} slotmachine.wheel = {} slotmachine.wheel[1] = {} slotmachine.wheel[1][1] = '$$$' slotmachine.wheel[1][2] = '^-^' slotmachine.wheel[1][3] = 'LOL' slotmachine.wheel[1][4] = '*-*' slotmachine.wheel[1][5] = '*-*' slotmachine.wheel[1][6] = '^-^' slotmachine.wheel[1][7] = '777' slotmachine.wheel[1][8] = '777' slotmachine.wheel[2] = {} slotmachine.wheel[2][1] = '$$$' slotmachine.wheel[2][2] = '^-^' slotmachine.wheel[2][3] = 'LOL' slotmachine.wheel[2][4] = '*-*' slotmachine.wheel[2][5] = '*-*' slotmachine.wheel[2][6] = '^-^' slotmachine.wheel[2][7] = '777' slotmachine.wheel[2][8] = '777' slotmachine.wheel[3] = {} slotmachine.wheel[3][1] = '$$$' slotmachine.wheel[3][2] = '^-^' slotmachine.wheel[3][3] = 'LOL' slotmachine.wheel[3][4] = '*-*' slotmachine.wheel[3][5] = '*-*' slotmachine.wheel[3][6] = '^-^' slotmachine.wheel[3][7] = '777' slotmachine.wheel[3][8] = '777' slotmachine.wheel[4] = {} slotmachine.wheel[4][1] = '$$$' slotmachine.wheel[4][2] = '^-^' slotmachine.wheel[4][3] = 'LOL' slotmachine.wheel[4][4] = '*-*' slotmachine.wheel[4][5] = '*-*' slotmachine.wheel[4][6] = '^-^' slotmachine.wheel[4][7] = '777' slotmachine.wheel[4][8] = '777' function SlotMachine(role) local randomNumber1 = math.random(1, 8) --Returns a number between 1 and 10. local randomNumber2 = math.random(1, 8) --Also returns a number between 1 and 10. local randomNumber3 = math.random(1, 8) --Returns a number between 1 and 10. local randomNumber4 = math.random(1, 8) --Also returns a number between 1 and 10. local slot = {} local prize = 0 local bonus = 'no bonus' for x=1,4 do slot[x] = {} slot[x][1] = slotmachine.wheel[x][math.random(1, 8)] slot[x][2] = slotmachine.wheel[x][math.random(1, 8)] slot[x][3] = slotmachine.wheel[x][math.random(1, 8)] end for row=1,4 do if ( slot[row][1] == slot[row][2] and slot[row][2] == slot[row][3]) then -- ROW STREAK if(slot[row][1] =='$$$') then prize = prize + 1000000 end if(slot[row][1] =='^-^') then prize = prize + 500000 end if(slot[row][1] =='777') then prize = prize + 777777 end if(slot[row][1] =='LOL') then prize = prize + 200000 bonus = 'Heaven Berry' end if(slot[row][1] =='*-*') then prize = prize + 100000 end end end if(prize ~= 0) then AddMoney ( role , 0 , prize ) end if(bonus == 'Heaven Berry') then GiveItem( role , 0 , 3844 , 1 , 1 ) end HelpInfoX(role, 0, "** SLOTMACHINE **__".."row 1: ["..slot[1][1].."] - ".."["..slot[1][2].."] - ".."["..slot[1][3].."]_".."row 2: ["..slot[2][1].."] - ".."["..slot[2][2].."] - ".."["..slot[2][3].."]_".."row 3: ["..slot[3][1].."] - ".."["..slot[3][2].."] - ".."["..slot[3][3].."]_".."row 4: ["..slot[4][1].."] - ".."["..slot[4][2].."] - ".."["..slot[4][3].."]__".."PRIZE: "..tostring(prize).." gold, ".."BONUS: "..bonus) return LUA_TRUE end THE NPC: \resource\script\MisScript\NpcScript06.lua Jackpot = {} Jackpot.Coins = {} Jackpot.Coins.amount = 30 -- 3 stacks of fairy coins 297 Jackpot.Coins.item = 0855 -- 3 stacks of fairy coins Jackpot.Coins.money = 10000 -- Money needed for second class advancement. function JackpotNPC() InitTrigger() TriggerCondition(1, HasItem, Jackpot.Coins.item, Jackpot.Coins.amount) TriggerCondition( 1, HasMoney, Jackpot.Coins.money ) TriggerCondition( 1, HasLeaveBagGrid, 1 ) TriggerCondition( 1, KitbagLock, 0 ) TriggerAction( 1, TakeMoney, Jackpot.Coins.money ) TriggerAction( 1, TakeItem, Jackpot.Coins.item, Jackpot.Coins.amount ) TriggerAction( 1, SlotMachine ) TriggerFailure( 1, JumpPage, 2 ) Talk( 1, "Jackpot Machine: For "..Jackpot.Coins.money.." gold and "..Jackpot.Coins.amount.." of fairy coins, you can try your luck and win a prize." ) Text( 1, "Try your luck, play a round!", MultiTrigger, GetMultiTrigger(), 1) Text( 1, "Explain the game.", JumpPage, 3) Text( 1, "Prizes", JumpPage, 4) Talk( 3, "Everytime you play a round there are three_wheels with four rows._The wheels will spin and you will see_the result in the next window._If you have three of the same slots in one_row, you win a prize.") Text( 3, "Back", JumpPage, 1) Talk( 4, "PRIZES:_3 x $$$ = 1 milion gold_3 x ^-^ = 500000 gold_3 x 777 = 777777 gold_3 x LOL = 200000 + a heavens berry_3 x *-* = 100000 gold.") Text( 4, "Back", JumpPage, 1) Talk( 2, "Failed to play a round. Insufficient gold or fairy coins" ) end NEW NPC ACTION PROCEDURE: \resource\script\MisSdk\MissionSdk.lua elseif actions[i].func == SlotMachine then PRINT( "ActionProc: SlotMachine") local ret = SlotMachine( character ) if ret ~= LUA_TRUE then PRINT( "ActionProc:SlotMachine = false" ) return LUA_FALSE end
  21. 0 points
    I found a problem with these files and fixed it For anyone who wants to try these files, make sure you change 1976 in the gateserver.cfg file to 1977
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...