#242 need a EvacAllowed function

Đã đóng
%! (template.HTML=3 năm trước cách đây)đang mở bởi neatz09 · 1 ý kiến

Need the ability to lock evac spells in zonescripts... will also probably need a EvacAllowed check for spell scripts

Need the ability to lock evac spells in zonescripts... will also probably need a EvacAllowed check for spell scripts
devn00b đã nhận xét 7 tháng trước cách đây
Chủ sở hữu

Fixed, requires SQL Change

ALTER TABLE zones ADD COLUMN can_evac INT NULL DEFAULT '1' AFTER can_gate;

Added 2 lua functions: int EQ2Emu_lua_SetCanEvac(lua_State* state) int EQ2Emu_lua_GetCanEvac(lua_State* state)

Example code is in spells/scout/escape.lua and below:

function precast(Caster, Target)

if(GetCanEvac(Caster) == 1)
then
    return true   
else
    SendMessage(Caster, "You cannot use evacuate spells in this zone.", "red")
    return false
end
return true

end

Fixed, requires SQL Change ALTER TABLE `zones` ADD COLUMN `can_evac` INT NULL DEFAULT '1' AFTER `can_gate`; Added 2 lua functions: int EQ2Emu_lua_SetCanEvac(lua_State* state) int EQ2Emu_lua_GetCanEvac(lua_State* state) Example code is in spells/scout/escape.lua and below: function precast(Caster, Target) if(GetCanEvac(Caster) == 1) then return true else SendMessage(Caster, "You cannot use evacuate spells in this zone.", "red") return false end return true end
Đăng nhập để tham gia bình luận.
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.