Jump to content

Rumor

Banned
  • Posts

    914
  • Joined

  • Last visited

  • Days Won

    15
  • Feedback

    0%

Everything posted by Rumor

  1. Yeah some of my stuff is a little longer than it needs to be, thankyou.
  2. M2 Download Center Download Here ( Internal ) This is the marriage quest modified by Shogun. It features clear English, automatic marriage announcements, and nice formatting.
  3. M2 Download Center Download Here ( Internal ) For this one you will need Mijago's quest functions, get them here: [Hidden Content] You have to edit the vnum of the item you want to use to give players coins on line 6 inside the "[" and "]" brackets. The number after the equals sign is the amount of coins you want the item to give the player. You can add more lines underneath this in the same format in-case you want different items to give different amounts of coins. You may need to modify the MYSQL query on line 29 to match the columns of your database table. It's pretty self-explanatory, but if you need assistance feel free to reply. quest givegiftcoins begin state start begin when 80017.use begin local count = pc.count_item(item.get_vnum()) local value = ({ [80017] = 100, })[item.get_vnum()] say_title('Gift Coin Scroll') say('') say('This coin scroll is worth: '..value..' NC.') say('Nirvana Coins can be used in the itemshop!') say('Remember, for each NC you spend you receive 1 NM.') say('This scroll was meant to be used to gift coins.') say('You ARE allowed to sell it, if you wish.') say('') wait() say_title('Gift Coin Scroll') say('') say('Would you like to add the NC to your acccount?') say('You can only use this item once.') say('') if select('Yes','No') == 2 then return end if count ~= pc.count_item(item.get_vnum()) then -- BUGUSER! say('') say_reward('Bug use attempted. Coin reward has been cancelled.') say('') return end mysql_query('UPDATE account.account SET nc = nc+'..value..' WHERE id = '..pc.get_account_id()..' LIMIT 1') mysql_query('INSERT INTO log.coinscrollgift_log (account_id, coins, time) VALUES (".. pc.get_account_id() ..", ".. value ..", NOW())') pc.remove_item(item.get_vnum()) syschat('Your account has successfully been rewarded with NC.') -- If item is not stackable use: -- item.remove() end end end
  4. M2 Download Center Download Here + Download Here ( Internal ) mysql_query = function(query) if not pre then local rt = io.open('CONFIG','r'):read('*all') pre,_= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4') end math.randomseed(os.time()) local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{} -- os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- für MySQL51 os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- für MySQL55 for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'t')) end; os.remove(fi); for i = 2, table.getn(t) do table.foreach(t[i],function(a, out[i-1] = out[i-1] or {} out[i-1][a] = tonumber( or b or 'NULL' out[t[1][a]] = out[t[1][a]] or {} out[t[1][a]][i-1] = tonumber( or b or 'NULL' end) end return out end pro tip: don't use MYSQL 5.1, use 5.5 or later Need this and many more useful functions? Download here: [Hidden Content] Add this file to the "quest" folder in your server. You need to open the "quest" folder in your server and edit the file called "questlib.lua". Add this line to the file: dofile('locale/singapore/quest/questing.lua')
  5. M2 Download Center Download Here ( Internal ) This will teleport a player outside of a map if he enters it and isn't a certain level or higher. Useful for when people try to access higher level maps you don't want them in until later via Couple's Ring or warp scroll. This can't be bypassed, it will always teleport them out of the map as soon as they enter it. quest bayblack begin state start begin when login with pc.get_map_index() == 194 begin if pc.get_level() < 70 then warp_to_village() end end end end quest capedragon begin state start begin when login with pc.get_map_index() == 195 begin if pc.get_level() < 100 then warp_to_village() end end end end quest mountthunder begin state start begin when login with pc.get_map_index() == 197 begin if pc.get_level() < 130 then warp_to_village() end end end end
  6. M2 Download Center Download Here ( Internal ) I had problems in my server with players filling their inventory and opening clams, so all the drops from the clams would fall on the floor and make people lag. This quest resolves that issue and allows you to set the chance of each drop from the clam, meaning you could make it drop whatever you like too. Thanks to Nightwish for this one. You need to set your clam "Type" in the database to "18". --powered by nightwish 4 nirvana -- quest clams begin state start begin when 27987.use begin if pc.get_empty_inventory_count() < 1 then chat("You don't have enough inventory space.") else pc.remove_item(27987,1) local rand = number(1,30) if rand == 1 then pc.give_item2(27992,1) elseif rand == 2 then pc.give_item2(27993,1) elseif rand == 3 then pc.give_item2(27994,1) elseif rand >= 4 then pc.give_item2(27990,1) end -- inventory check end -- when .use end end -- state "start" end end -- Quest end end
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.