廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 2511 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
h5937126
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x2
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][其他] 求教修改暗黑破壞神II怪物金錢、經驗
#include <amxmodx>
#include <d2lod>
#include <engine>
#include <hamsandwich>
#include <fakemeta>
new PLUGIN_NAME[] = "Diablo II LOD 怪物補助插件"
new PLUGIN_AUTHOR[] = "xbatista"
new PLUGIN_VERSION[] = "1.0"
#define MAX_MONSTERS 14
#define COINS_CLASSNAME "CoinsMonster"
new const Monster_Models[MAX_MONSTERS][] =
{
 "models/agrunt.mdl",
 "models/big_mom.mdl",
 "models/bullsquid.mdl",
 "models/controller.mdl",
 "models/garg.mdl",
 "models/headcrab.mdl",
 "models/houndeye.mdl",
 "models/islave.mdl",
 "models/w_squeak.mdl",
 "models/zombie.mdl",
 "models/hgrunt.mdl",
 "models/tentacle.mdl",
 "models/babygarg.mdl",
 "models/bigrat.mdl"
}
new const Monster_Xp[MAX_MONSTERS] =
{
 150,
 600,
 100,
 120,
 0,
 50,
 0,
 120,
 0,
 80,
 0,
 0,
 0,
 0
}
new const Monster_Coins[MAX_MONSTERS] =
{
 20,
 70,
 10,
 20,
 0,
 3,
 0,
 25,
 0,
 15,
 0,
 0,
 0,
 0
}
new const Monster_Names[MAX_MONSTERS][] =
{
 "異型戰士",
 "大媽 (王)",
 "鱷魚",
 "首腦",
 "巨人 (王)",
 "食腦蟲",
 "百募狗",
 "弗地崗人",
 "聖甲蟲",
 "殭屍",
 "人類戰士",
 "鷹爪",
 "小型巨人 (王)",
 "老鼠"
}
new g_iMaxPlayers;
public plugin_init()
{
 register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
 RegisterHam(Ham_Killed, "func_wall", "Monster_Killed");
 register_touch( COINS_CLASSNAME, "player", "Coins_Pickup")
 register_logevent("Event_Round_End", 2, "1=Round_End");
 g_iMaxPlayers = get_maxplayers();
}
public Event_Round_End()
{
 Remove_All_Coin_Ents();
}
public Monster_Killed(this, idattacker, shouldgib)
{
 if ( !( 1 <= idattacker <= g_iMaxPlayers ) || !is_valid_ent(this) || !get_player_logged(idattacker) )
  return HAM_IGNORED;
 new MonsterMdl[32];
 entity_get_string( this, EV_SZ_model, MonsterMdl, charsmax(MonsterMdl) );
 for(new monsters = 0; monsters < MAX_MONSTERS; monsters++)
 {
  if( equal( MonsterMdl, Monster_Models[monsters] ) )
  {
   if ( Monster_Xp[monsters] > 0 )
   {
    set_p_xp( idattacker, get_p_xp(idattacker) + Monster_Xp[monsters]);
    client_print( idattacker, print_center, "你殺了 %s, +%d經驗", Monster_Names[monsters], Monster_Xp[monsters]);
   }
   if ( Monster_Coins[monsters] > 0 )
    drop_coins( this, COINS_CLASSNAME, Monster_Coins[monsters] + (get_p_level(idattacker) / 4) );
  }
 }
 return HAM_IGNORED;
}
// Touch, coins
public Coins_Pickup(ptr, ptd)
{
 if( is_user_alive(ptd) && pev_valid(ptr) )
 {  
  new gold = entity_get_int(ptr , EV_INT_iuser1)
  set_p_gold(ptd, get_p_gold(ptd) + gold)
     
  remove_entity(ptr)
 }
}
public Remove_All_Coin_Ents()
{
 new coin_ent = find_ent_by_class(-1, COINS_CLASSNAME)
 
 while ( coin_ent )
 {
  remove_entity(coin_ent)
  coin_ent = find_ent_by_class(coin_ent, COINS_CLASSNAME)
 }
}

例如我想改〝老鼠〞做10經5金



獻花 x0 回到頂端 [樓 主] From:未知地址 | Posted:2011-09-04 18:18 |
h5937126
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x2
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

改左都冇反應


獻花 x0 回到頂端 [1 樓] From:未知地址 | Posted:2011-09-05 17:30 |
vz123
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x2
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

模組位=
"models/agrunt.mdl",
"models/big_mom.mdl",
"models/bullsquid.mdl",
"models/controller.mdl",
"models/garg.mdl",
"models/headcrab.mdl",
"models/houndeye.mdl",
"models/islave.mdl",
"models/w_squeak.mdl",
"models/zombie.mdl",
"models/hgrunt.mdl",
"models/tentacle.mdl",
"models/babygarg.mdl",
"models/bigrat.mdl"

經=
new const Monster_Xp[MAX_MONSTERS] =
{
150,
600,
100,
120,
0,
50,
0,
120,
0,
80,
0,
0,
0,
0
}

金=
new const Monster_Coins[MAX_MONSTERS] =
{
20,
70,
10,
20,
0,
3,
0,
25,
0,
15,
0,
0,
0,
0
}


獻花 x0 回到頂端 [2 樓] From:未知地址 | Posted:2011-11-04 16:38 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.016421 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言