Ots Forum

Ots Forum

  • Nie jesteś zalogowany.
  • Polecamy: Moda

#1 2008-08-02 13:08:03

KaRoLtNk

Administrator

Zarejestrowany: 2008-07-31
Posty: 11
Punktów :   

Dyskoteka na OTS!

Spoiler:

-- ***Basic colours
-- BLUE = 5
-- RED = 180
-- YELLOW = 210

-- ***More colours
-- CRYSTAL = 65
-- BROWN = 78
-- PLATINUM = 89
-- PURPLE = 147
-- ORANGE = 198
-- PINK = 203 <- low noticability

-- ***Even more colours focused around different tints
-- DARKRED = 36
-- DARKBLUE = 2
-- DARKGREEN = 6
-- LIGHTGREEN = 30
-- LIGHTBLUE = 35
-- LIMEGREEN = 174 <- most recognizable as yellow

-- ***Normal lights
-- LIGHTGREY = 172 <- normal light
-- WHITE_EXP = 215 <- normal light
-- SKYBLUE = 179 <- normal light
-- GREY = 129 <- normal light

-- ***No category
-- BLACK = 1 <- dark dark blue
-- NONE = 255 <- weird mix of pink red and purple

This is from global.lua but sorted, the script will randomize everything between 1-255 for light and text. This is only FYI.


* Przypadkowe efekty są bardzo dobre.
* Kolorowy fajny tekst.
* Muzyczne efekty ustala losowo.
* Zmieniamy intensywność światła.
* Różne wiadomości takie jak "Zaczynamy dyskotekę!"
* Możesz wybrać sobie nagrodę, a inaczej mówiąc ją "wytańczyć".
* Łatwe modyfikowanie.


Krok 1

W map edytorze zrób pokój nie ważne czy 3x3, czy 6x6. Ustaw Actions 9777.

Krok 2
Jeśli chcesz robić inne pokoje np. 2, czy 3 to musisz zmienić to w movements.xml.

Krok 3
Dodajemy do movements.xml:

Spoiler:

<movevent event="StepIn" actionid="9777" script="fireinthedisco.lua" />

poiler:

-- Disco made by Roman
-- Roman - OTFans
-- Simple condition setup - gives players utani gran hur effect
-----------------------------------------------------------------------------------------------------------------------------
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500*3) -- set the value to the same as bottoms value of lightTicks * 5
setConditionFormula(condition, 0.70, 300, 0.70, 300)
setCombatCondition(combat, condition)
-----------------------------------------------------------------------------------------------------------------------------
function onStepIn(cid, item, pos)
-- Basic Configurations
-----------------------------------------------------------------------------------------------------------------------------
local lightLevel = 8 -- 1-10 (could be very wrong <img src="http://otfans.net/images/smilies/tongue.gif" border="0" alt="" title="Tongue" class="inlineimg" />Wink
local lightTicks = 500 -- set how long each light should stay on for, leave as it is if you dont know
local moneyChance = 15 -- set a value and it will look like this: (1 in 10) for example, if you set 20 then it will be (1 in 20) chance
local rewardType = 1 -- set to 1 for gold, 2 for platinum, or 3 for crystal NOTE: not recommended to set crystal coins, you can set to some other differnent coin like token and trade with NPC for prizes
local minMoney = 1 -- min amount of coins to get
local maxMoney = 90 -- max amount of coins to get
local maxTime = 1*60*1000 -- max time allowed in disco until kick - change "1" to different values to set different minutes
-----------------------------------------------------------------------------------------------------------------------------
local gold_ID = 2148 -- gold coin ID
local plat_ID = 2152 -- platinum coin ID
local crystal_ID = 2160 -- crystal coin ID
-----------------------------------------------------------------------------------------------------------------------------
-- Roman - OTFans
local reward = 2148 -- no touchie!
local lighttextColours = {"5", "180", "210", "65", "78", "89", "147", "198", "203", "36", "2", "6", "30", "35", "174", "1", "255"} -- ignore for now
local lighttextRND = math.random(1, 254)
local effectRND = math.random(21,24)
local moneychanceRND = math.random(1,moneyChance)
local moneyRND = math.random(minMoney,maxMoney)
local disco_stat = 0
local disco_status = getPlayerStorageValue(cid,9777)
-----------------------------------------------------------------------------------------------------------------------------
-- Roman - OTFans
if rewardType == 1 then
reward = gold_ID
elseif rewardType == 2 then
reward = plat_ID
elseif rewardType == 3 then
reward = crystal_ID
end
-- Roman - OTFans
-----------------------------------------------------------------------------------------------------------------------------
if item.actionid == 9777 then
if disco_status == -1 then
local var = positionToVariant(getPlayerPosition(cid))
doCombat(cid, combat, var)
doPlayerSendTextMessage(cid,22,"Start the disco!")
doSetCreatureLight(cid, lightLevel, lighttextRND, lightTicks)
doSendAnimatedText(getPlayerPosition(cid), "Disco!", lighttextRND)
doSendMagicEffect(getPlayerPosition(cid), effectRND)
if moneychanceRND == 1 then
doPlayerAddItem(cid,reward,moneyRND)
doPlayerSendTextMessage(cid,22,"Moneh is flowin in!")
end
if disco_stat == 0 then
addEvent(DiscoCheck,maxTime,cid)
disco_stat = 1
end
else
doPlayerSendCancel(cid, "You have already participated in this disco parteh!")
end
end
end
-----------------------------------------------------------------------------------------------------------------------------
-- Roman - OTFans
function DiscoCheck(cid)
setPlayerStorageValue(cid,9777,1)
end
-- Roman - OTFans
-----------------------------------------------------------------------------------------------------------------------------


Krok 4
Ustaw wszystkie konfiguracje.

local lightLevel = 8 -- 1-10 (could be very wrong <img src="http://otfans.net/images/smilies/tongue.gif" border="0" alt="" title="Tongue" class="inlineimg" />Wink
local lightTicks = 500 -- set how long each light should stay on for, leave as it is if you dont know
local moneyChance = 15 -- set a value and it will look like this: (1 in 10) for example, if you set 20 then it will be (1 in 20) chance
local rewardType = 1 -- set to 1 for gold, 2 for platinum, or 3 for crystal NOTE: not recommended to set crystal coins, you can set to some other differnent coin like token and trade with NPC for prizes
local minMoney = 1 -- min amount of coins to get
local maxMoney = 90 -- max amount of coins to get
local maxTime = 1*60*1000 -- max time allowed in disco until kick - change "1" to different values to set different minutes

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.narutofaans.pun.pl www.dissowo.pun.pl www.utopjec.pun.pl www.ncplusnews.pun.pl www.koimonogatari.pun.pl