目前共有11篇帖子。
http://tieba.blue.cat/list.php?b=%B0%C2%B4%C4%C2%E
11樓 巨大八爪鱼 2010-9-4 12:45
共有9篇貼子 【腳本】事件中常用腳本 #filter_pop{height:130px;width:370px;margin-top:20px;} #filter_pop p{margin:0;} #filter_pop table{text-align:center;width:100%} #filter_pop thead{font-weight:bold;} #filter_pop .gray{color:#676767} #filter_pop #filter_phone_ip_info{color:#693703;visibility:hidden;margin-left:20px;} #filter_pop #filter_ip_info{text-align:right;padding-right:35px} #filter_pop table td{padding:3px;} var pb_filter_user=function(){ var _content=null; var _cur_instance={}; var _pop=null; function show_filter_dialog(){ _output=['']; var ban_user=(_cur_instance.type=='get_ip_tbs'); var is_phone_ip=_content.is_phone_ip; var can_prison_ip=_cur_instance.can_prison_ip; if(ban_user){ if(can_prison_ip){ _output.push('用戶名封禁時長操作'); _output.push(_cur_instance.user_name); _output.push(''); _output.push('1310 天'); _output.push(''); _output.push(''); _output.push('') _output.push(''); _output.push('

手機IP無法封禁

'); _output.push('

* IP封禁默認為1天

'); }else{ _output.push('用戶名封禁時長操作'); _output.push(_cur_instance.user_name); _output.push(''); _output.push('1天'); _output.push(''); _output.push(''); } }else{ _output.push('用戶名封禁時長操作'); _output.push(''+_cur_instance.ip+''); _output.push('1 天'); _output.push(''); _output.push('

手機IP無法封禁

'); } _output.push(''); _pop=new Popup({width:375,height:130}); _pop.html(_output.join(''),'封禁操作'); if(is_phone_ip){ Fe.G('ban_ip_button').style.display='none'; Fe.G('filter_phone_ip_info').style.visibility='visible'; } } return { 'filter_forum_user':function(){ if(_cur_instance.can_prison_ip){ _cur_instance.ban_days=Fe.G('select_ban_days').value; }else{ _cur_instance.ban_days=1; } Fe.Ajax.post('/bawu/cm',Fe.Object.toQueryString({ 'cm':'filter_forum_user', 'user_name':_cur_instance.user_name, 'ban_days':_cur_instance.ban_days, 'word':PageData.forum_name, 'fid':PageData.forum_id, 'tbs':_content.tbs_ban_user, 'ie':'utf-8' }),function(xhr){ if(_pop){ if(Fe.G('filter_pop')) Fe.G('filter_pop').innerHTML='

封禁成功!

'; setTimeout(function(){_pop.reset();},600); } }) }, 'filter_both':function(){ pb_filter_user.filter_forum_user(); pb_filter_user.filter_forum_ip(); }, 'filter_forum_ip':function(){ Fe.Ajax.post('/bawu/cm',Fe.Object.toQueryString({ 'cm':'filter_forum_ip', 'user_ip':_content.ip_int, 'ip_secure_str':_content.ip_secure_str, 'ban_days':1, 'word':PageData.forum_name, 'fid':PageData.forum_id, 'tbs':_content.tbs_ban_ip, 'ie':'utf-8' }),function(xhr){ if(_pop){ if(Fe.G('filter_pop')) Fe.G('filter_pop').innerHTML='

封禁成功!

'; setTimeout(function(){_pop.reset();},600); } }) }, 'get_ip_tbs':function(user_name,ip,ip_int,post_id,type,can_prison_ip){ _cur_instance={ 'type':type, 'ip':ip, 'ip_int':ip_int, 'user_name':user_name, 'post_id':post_id, 'word':PageData.forum_name, 'fid':PageData.forum_id, 'can_prison_ip':can_prison_ip, 'ie':'utf-8' }; var _para=Fe.extend({},_cur_instance); if(_para.type=="get_tbs"){ _para.user_name=_para.ip_int; } delete _para.ip; delete _para.ip_int; delete _para.can_prison_ip; Fe.Ajax.get('/bawu/filter/get_ip_tbs?'+Fe.Object.toQueryString(_para)+'&t='+Math.random(),function(xhr){ _content=eval("("+xhr.responseText+")"); show_filter_dialog(); }) } }; }(); 魔塔勇士 巨大八爪魚 176位粉絲

1樓

顯示文章:
$game_temp.message_text= ""
顯示引號中的文章。

更改文章選項:
$game_system.message_position =0,1,2
表示上、中、下,三個位置

$game_system.message_frame = 0 ,1
0表示不透明,其他的話就透明

等待:
@wait_count = X
等待X幀

中斷事件處理:
command_end

把某一個事件暫時消除
$game_map.events[X].erase
其中X表示把X號事件暫時消除,如果是消除本事件X = @event_id

執行公共事件:
$game_temp.common_event_id = 編號
執行編號的公共事件。注意,這個執行和直接在事件中的公共事件有微妙區別。

開關操作:
$game_switches[編號] = true / false
true是打開,false是關閉

變數操作:
$game_variables[編號] = 數值
這裡有一些常用的內容:
rand(100):返回0-99的隨機數
rand(100)+10000:返回10000-10099的隨機數
$game_party.item_number(編號):編號物品的個數

角色相關:以下為某編號的角色的相關屬性
生命:$game_actors[編號].hp
精神:$game_actors[編號].sp
經驗:$game_actors[編號].exp
等級:$game_actors[編號].level
最大生命:$game_actors[編號].maxhp
最大精神:$game_actors[編號].maxsp
力量:$game_actors[編號].str
靈巧:$game_actors[編號].dex
速度:$game_actors[編號].agi
魔力:$game_actors[編號].int
攻擊力:$game_actors[編號].atk
物理防禦:$game_actors[編號].pdef
魔法防禦:$game_actors[編號].mdef
迴避修正:$game_actors[編號].eva
姓名:$game_actors[編號].name
職業編號:$game_actors[編號].class_id
職業名稱:$game_actors[編號].class_name
武器編號:$game_actors[編號].weapon_id
防具1編號:$game_actors[編號].armor1_id
防具2編號:$game_actors[編號].armor2_id
防具3編號:$game_actors[編號].armor3_id
防具4編號:$game_actors[編號].armor4_id
完全回復:$game_actors[編號].recover_all
領悟特技:$game_actors[編號].learn_skill(編號)
遺忘特技:$game_actors[編號].forget_skill(編號)

位置(前衛返回0,中衛返回1,後衛返回2):$data_classes[$game_actors[編號].class_id].position
學會特技總數:$game_actors[編號].skills.size

敵人:$game_troop.enemies[編號]
敵人擁有角色的部分功能,包括.hp,.sp,.maxhp,.maxsp,.str,.dex,.agi,.int,.atk,.pdef,.mdef,.eva

地圖的事件屬性:
$game_map.events[編號].x,$game_map.events[編號].y
編號事件的x,y坐標
$game_map.events[編號].screen_x,$game_map.events[編號].screen_y
編號事件的螢幕x,y坐標
$game_map.events[編號].direction
編號事件的朝向
$game_map.events[編號].terrain_tag
編號事件所處的地形標誌
$game_map.events[編號].moveto(x,y)
把事件扔到(x,y)
——————————————————以上幾個事件的,如果要求為角色,則為「$game_player.x」等

地圖ID:$game_map.map_id
同伴總人數:$game_party.actors.size
步數:$game_party.steps
金錢:$game_party.gold
遊戲總時間(秒數):Graphics.frame_count / Graphics.frame_rate
遊戲總幀數:Graphics.frame_count
遊戲幀速率(可直接=n調整):Graphics.frame_rate
計時器剩餘秒數:$game_system.timer / Graphics.frame_rate
存檔次數:$game_system.save_count

獨立開關操作:
$game_self_switches[[地圖編號,事件編號,"A"]] = true/false
把地圖編號的地圖上的事件編號的事件的A開關打開。其實不光ABCD,還可以建立更多獨立開關,不過調用也得用同樣腳本。

計時器打開:
$game_system.timer = 需要的秒數;$game_system.timer_working = true

計時器關閉:

2010-4-11 19:23 回復 if(Fe.G("bakan_view")){ Stats.init('bakan_view',{bakan_post:'fr=tb0_forum&st_mod=pb&st_type=bakan_post'}); } 魔塔勇士 巨大八爪魚 176位粉絲

2樓

$game_system.timer

回復帖子

  抱歉,本吧禁止發帖
內容:
用戶名: 您目前是匿名發表
 
 
©2010-2025 Arslanbar [手機版] [桌面版]
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。