• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 298  文章 - 377  trackbacks - 0
            <2016年6月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            常用鏈接

            留言簿(34)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊

            收藏夾

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            一、在items.scp中添加下面代碼
            [item31023]
            name=奇跡寶石
            questscript=MemberInfo
            description=
            class=12
            quality=5
            startquest=30010//這里不能修改
            reqlevel=1
            quality=1
            buyprice=1000000
            bonding=4
            classes=07FF
            model=29691
            level=1
            races=0FF
            stackable=1
            maxcount=1
            material=-1
            pagetext=1
            language=1
            二、在pages.scp中添加下面代碼
            [page1]
            text=<HTML>
            text=<BODY>
            text=<H1align="center">WelcometoWorldofDarkness</H1>
            text=<BR/>
            text=<IMGsrc="Interface\Cursor\GatherHerbs"align="left"/>
            text=<IMGsrc="Interface\Cursor\GatherHerbs"align="right"/>
            text=<Palign="center">Greetings,<BR/>$N</P>
            text=<BR/>
            text=<IMGsrc="Interface\WorldMap\WorldMap-Icon"align="right"/>
            text=<Palign="left">WelcomeToourserver.<BR/>Wehopeyouenjoyithere.<BR/>IfyouwantTogetinTouch<BR/>withus,ThenJoinushere:</P>
            text=<BR/>
            text=<IMGsrc="Interface\Glues\CharacterCreate\UI-RotationRight-Big-Up"align="left"/>
            text=<Palign="right">ROBBS:roworld.no-ip.info</P>
            text=<Palign="right">roworld.xicp.net</P>
            text=<BR/>
            text=<BR/>
            text=<Palign="left">NowhaveagoodTimeexploringand<BR/>experiencingWorldOfWarcraft<BR/>withyournew$r$c.</P>
            text=<BR/>
            text=<IMGsrc="Interface\TalentFrame\PaladinProtection-TopLeft"align="left"/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=<BR/>
            text=</BODY>
            text=</HTML>
            text=
            三、在quests.scp中添加下面代碼
            [quest30010]
            name=幫助系統(tǒng)
            levels=1255
            reward_xp=0
            desc=歡迎使用幫助系統(tǒng)
            details=支持我們
            zone=0

            [quest30011]
            name=〖隨身出售〗
            levels=00
            reward_xp=0
            zone=0

            [quest30012]
            name=〖隨身銀行〗
            levels=00
            reward_xp=0
            zone=0

            [quest30013]
            name=〖記憶位置〗
            levels=00
            reward_xp=0
            zone=0

            [quest30014]
            name=〖傳送服務(wù)〗
            levels=00
            reward_xp=0
            zone=0

            [quest30015]
            name=〖游戲好友〗
            levels=00
            reward_xp=0
            zone=0

            [quest30016]
            name=〖卡號自救〗
            levels=00
            reward_xp=0
            zone=0

            [quest30017]
            name=〖使用說明〗
            levels=00
            reward_xp=0
            zone=0

            [quest30018]
            name=〖原地復(fù)活〗
            levels=00
            reward_xp=0
            zone=0
            四、在creatures.scp中添加下面代碼
            [creature31023]//這里不能修改
            name=隨身NPC
            questscript=MemberMan//這里不能修改
            flags1=08480046
            guild=玩家NPC
            npcflags=04002
            npctext0_0=你好,$N,玩家隨身NPC。
            qtgids0=50000
            attack=191210.1
            bounding_radius=0.208
            civilian=1
            combat_reach=2.21
            damage=0.81.2
            equipmodel=07439242133000
            faction=35
            level=10
            loottemplate=54
            maxhealth=334
            maxmana=220
            model=1287
            money=12600
            speed=0.96
            type=7[/post]




            namespaceevalMemberInfo{}

            procMemberInfo::QueryQuest{objplayerquestid}{
            SendQuestsList$player$obj3001130012300133001430015300163001730018
            }

            procMemberInfo::QuestSelect{objplayerquestid}{
            SendGossipComplete$player
            switch$questid{
            30011{setguaid[GetSelection$player]
            if{[GetSelection$player]=="0"}{SendGossip$player$obj{npctext1}{text0"請選擇一個怪物,尸體或npc,距離必須4碼以內(nèi)才能使用隨身銀行!!";return
            }}
            if{[GetSelection$player]!="0"}{VendorList$player$guaid}}
            30012{setguaid[GetSelection$player]
            if{[GetSelection$player]=="0"}{SendGossip$player$obj{npctext1}{text0"請選擇一個怪物,尸體或npc,距離必須4碼以內(nèi)才能使用隨身銀行!!";return
            }}
            if{[GetSelection$player]!="0"}{BankerList$player$guaid}}
            30013{SetBindpoint$player;SendGossip$player$obj{npctext1}{text7"恭喜你,位置記憶成功.?返回主菜單..."}}
            30014{


            MemberMan::QuestHello$obj$player}
            30015{SendGossip$player$obj{npctext1}{text0"暫不開放"}}
            30016{setss[GetBindpoint$player]
            setmap[lindex$ss0]
            setx[lindex$ss1]
            sety[lindex$ss2]
            setz[lindex$ss3]
            Teleport$player$map$x$y$z}
            30017{setfiles"ARK/Memberhelp.txt";if{[fileexists$files]==1}{HelpInfo::readfile$player$obj$files}}
            30018{Resurrect$player}
            default{SendGossip$player$obj{npctext1}{text0"building..."}
            }

            }

            }


            procMemberInfo::GossipSelect{objplayeroption}{
            Say$player0"\nMemberInfo::GossipSelect"
            }


            procMemberInfo::QuestAccept{objplayerquestid}{
            #Say$player0"\nMemberInfo::QuestAccept"
            }

            procMemberInfo::QuestChooseReward{objplayerquestidchoose}{
            Say$player0"\nMemberInfo::QuestChooseReward"
            }

            procMemberInfo::QuestHello{objplayer}{
            Say$player0"\nMemberInfo::QuestHello"
            }


            procMemberInfo::OnOpen{objplayerlootid}{
            Say$player0"\nMemberInfo::OnOpen"
            }
            ;#-=-=-=-=-=-=-=-=-=-=-=-=-
            ;

            namespaceevalMemberMan{}
            procMemberMan::QuestStatus{objplayer}{setreply7;return$reply}
            procMemberMan::GossipHello{objplayer}{MemberMan::QuestHello$obj$player}
            procMemberMan::QuestHello{objplayer}{
            Point:ointset$playerMemberMan"MainMenu"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text1"------------------"}\
            {text1"城市傳送"}\
            {text3"副本傳送1"}\
            {text3"副本傳送2"}\
            {text3"副本傳送3"}\
            {text3"副本傳送4"}\
            {text2"戰(zhàn)場傳送"}\
            {text1"------------------"}\
            {text7"請把我的爐石綁定在這里!?"}\
            {text7"請幫我激活所有的飛行點!?"}

            }
            procMemberMan::GossipSelect{objplayeroption}{
            SendSwitchGossip$player$obj1
            setmenu[Point:ointread$playerMemberMan]
            switch$menu{
            "MainMenu"{switch$option{
            1{
            Say$obj0"歡迎使用玩家?guī)椭到y(tǒng)——傳送NPC,請問您要去哪個城市?"
            Point:ointset$playerMemberMan"Teleport"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text0"返回主菜單..."}\
            {text5"1傳送到暴風(fēng)城---1金"}\
            {text5"2傳送到鐵爐堡---1金"}\
            {text5"3傳送到達納蘇斯---1金"}\
            {text5"4傳送到奧格瑞瑪---1金"}\
            {text5"5傳送到雷霆崖---1金"}\
            {text5"6傳送到幽暗城---1金"}\
            {text5"7傳送到棘齒城---1金"}\
            {text5"8傳送到藏寶海灣---1金"}

            Emote$obj$player163
            }
            2{
            Say$obj0"歡迎使用玩家?guī)椭到y(tǒng)——傳送NPC,請問您要去哪個城市?"
            Point:ointset$playerMemberMan"FBTeleport1"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text0"返回主菜單..."}\
            {text5"1熔火之心---10金"}\
            {text5"2死亡礦井---10金"}\
            {text5"3通靈學(xué)院---10金"}\
            {text5"4黑石深淵---10金"}\
            {text5"5奧尼克西亞的巢穴---10金"}\
            {text5"6暴風(fēng)城監(jiān)獄---10金"}\
            {text5"7影牙城堡---10金"}\
            {text5"8哀號洞穴---10金"}

            Emote$obj$player163
            }
            3{
            Say$obj0"歡迎使用玩家?guī)椭到y(tǒng)——傳送NPC,請問您要去哪個城市?"
            Point:ointset$playerMemberMan"FBTeleport2"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text0"返回主菜單..."}\
            {text5"1剃刀沼澤1---10金"}\
            {text5"2剃刀沼澤2---10金"}\
            {text5"3奧達曼——守護者大廳---10金"}\
            {text5"4諾莫瑞根——發(fā)條小涇---10金"}\
            {text5"5剃刀高地---10金"}\
            {text5"6阿塔哈卡神廟---10金"}\
            {text5"7祖爾法拉克---10金"}\
            {text5"8黑手大廳---10金"}

            Emote$obj$player163
            }
            4{
            Say$obj0"歡迎使用玩家?guī)椭到y(tǒng)——傳送NPC,請問您要去哪個城市?"
            Point:ointset$playerMemberMan"FBTeleport3"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text0"返回主菜單..."}\
            {text5"1斯坦索姆---10金"}\
            {text5"2怒焰裂谷---10金"}\
            {text5"3瑪拉頓——邪魔洞穴---10金"}\
            {text5"4黑翼之巢---10金"}\
            {text5"5安其拉廢墟---20金"}\
            {text5"6安其拉---20金"}

            Emote$obj$player163
            }
            5{
            Say$obj0"歡迎使用玩家?guī)椭到y(tǒng)——傳送NPC,請問您要去哪個城市?"
            Point:ointset$playerMemberMan"FBTeleport4"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text0"返回主菜單..."}\
            {text5"1黑暗之門---20金"}\
            {text5"2翡翠森林---20金"}\
            {text5"3時光巨洞---20金"}\
            {text5"4海加爾山---20金"}\
            {text5"5地鐵海底---20金"}\
            {text5"6艾爾文之塔---20金"}\
            {text5"7GM之島---20金"}

            Emote$npc$player163
            }
            6{
            if{[Warsong::AddToQueue$player]}{
            setAlliance"4891538.041481.46352.409"
            setHorde"489918.0491434.1346.476"
            if{[Custom::GetPlayerSide$player]==0}{Custom::TeleportPos$player$Alliance
            }else{Custom::TeleportPos$player$Horde}
            #Emote$obj4
            }else{
            SendGossip$player$obj{npctext1}{text0"戰(zhàn)場關(guān)閉了."}

            }
            }
            11{
            Point:ointset$playerMemberMan"Others"
            SendSwitchGossip$player$obj1
            SendGossip$player$obj{npctext1}\
            {text7"??返回主菜單"}\
            {text7"請把我的爐石綁定在這里!?"}\
            {text7"請幫我激活所有的飛行點!?"}
            }
            5{SetBindpoint$player;Point:ointset$playerMemberMan"Back";SendGossip$player$obj{npctext1}{text7"恭喜你,綁定成功?.??返回主菜單..."}
            }
            6{Point:ointset$playerMemberMan"TaxiNode"
            settmp[Point:ointread$playerTaxiNode]
            if{$tmp>=77}{Point:ointset$playerMemberMan"Back";SendGossip$player$obj{npctext1}"text7恭喜你,所有飛行點已經(jīng)全部激活,點擊返回主菜單!";return}
            settmp2[expr$tmp*1.2]
            SendGossip$player$obj{npctext1}"text7已激活?$tmp2%"

            }
            default{SendGossip$player$obj{npctext1}{text7"??返回主菜單"}
            }
            }}
            "TaxiNode"{
            settmp[Point:ointread$playerTaxiNode]
            if{$tmp>=77}{Point:ointset$playerMemberMan"Back";SendGossip$player$obj{npctext1}"text7恭喜你,所有飛行點已經(jīng)全部激活,點擊返回主菜單!";return}
            if{$tmp>=0&&$tmp<=71}{TaxiNodeExplorered$player$tmp
            TaxiNodeExplorered$player[expr$tmp+1]
            TaxiNodeExplorered$player[expr$tmp+2]
            TaxiNodeExplorered$player[expr$tmp+3]
            TaxiNodeExplorered$player[expr$tmp+4]
            TaxiNodeExplorered$player[expr$tmp+5]
            TaxiNodeExplorered$player[expr$tmp+6]
            settmp[expr$tmp+7]
            Point:ointset$playerTaxiNode$tmp}
            settmp2[expr$tmp*1.2]
            SendGossip$player$obj{npctext1}"text7已激活?$tmp2%"
            }
            "Teleport"{Say$obj0"歡迎下次再來?)"
            switch$option{
            0{MemberMan::QuestHello$obj$player;return}
            1{if{[GetLevel$player]>=1}{
            #---------------------[ChangeMoney$player-10000]"-10000"為傳送的費用---------------------------------------------#
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0-906543494}}
            }
            2{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0-5032-819495}}
            }
            3{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player1996120551329}}
            }
            4{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player11317-438327}}
            }
            5{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player1-139114023}}
            }
            6{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0190923553}}
            }
            7{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player1-977-37886}}
            }
            8{if{[GetLevel$player]>=1}{
            setmon[ChangeMoney$player-10000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0-143025189}}
            }
            }

            Emote$obj$player163
            }
            "FBTeleport1"{Say$obj0"歡迎下次再來?)"

            switch$option{
            0{MemberMan::QuestHello$obj$player;return}
            1{if{[GetLevel$player]>=56}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player4091093.45-469.41-105}}
            if{[GetLevel$player]<56}{Say$player0"我需要56級才能進入!"}}
            2{if{[GetLevel$player]>=11}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player36-16-38362}}
            if{[GetLevel$player]<11}{Say$player0"我需要11級才能進入!"}}
            3{if{[GetLevel$player]>=41}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player289199126135}}
            if{[GetLevel$player]<41}{Say$player0"我需要41級才能進入!"}}
            4{if{[GetLevel$player]>=48}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player23045826-69}}
            if{[GetLevel$player]<48}{Say$player0"我需要48級才能進入!"}}
            5{if{[GetLevel$player]>=56}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player24930-60-55}}
            if{[GetLevel$player]<56}{Say$player0"我需要56級才能進入!"}}
            6{if{[GetLevel$player]>=19}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player3454.230.28-18}}
            if{[GetLevel$player]<19}{Say$player0"我需要19級才能進入!"}}
            7{if{[GetLevel$player]>=14}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player33-228.192110.5676.882}}
            if{[GetLevel$player]<14}{Say$player0"我需要14級才能進入!"}}
            8{if{[GetLevel$player]>=11}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player43-163132-736}}
            if{[GetLevel$player]<11}{Say$player0"我需要11級才能進入!"}}

            }
            Emote$obj$player163
            }
            "FBTeleport2"{Say$obj0"歡迎下次再來?)"

            switch$option{
            0{MemberMan::QuestHello$obj$player;return}
            1{if{[GetLevel$player]>=21}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player471943154482}}
            if{[GetLevel$player]<21}{Say$player0"我需要21級才能進入!"}}
            2{if{[GetLevel$player]>=16}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player48-151106-38}}
            if{[GetLevel$player]<16}{Say$player0"我需要16級才能進入!"}}
            3{if{[GetLevel$player]>=31}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player70-22649-463}}
            if{[GetLevel$player]<31}{Say$player0"我需要31級才能進入!"}}
            4{if{[GetLevel$player]>=20}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player90-332-2.2-151}}
            if{[GetLevel$player]<20}{Say$player0"我需要20級才能進入!"}}
            5{if{[GetLevel$player]>=30}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player1292592110752}}
            if{[GetLevel$player]<30}{Say$player0"我需要30級才能進入!"}}
            6{if{[GetLevel$player]>=41}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==41)}{Teleport$player109-31999.9-131}}
            if{[GetLevel$player]<26}{Say$player0"我需要26級才能進入!"}}
            7{if{[GetLevel$player]>=40}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player20912138418.9}}
            if{[GetLevel$player]<40}{Say$player0"我需要40級才能進入!"}}
            8{if{[GetLevel$player]>=44}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player22980-23352}}
            if{[GetLevel$player]<44}{Say$player0"我需要44級才能進入!"}}

            }
            Emote$obj$player163
            }
            "FBTeleport3"{Say$obj0"歡迎下次再來?)"

            switch$option{
            0{MemberMan::QuestHello$obj$player;return}
            1{if{[GetLevel$player]>=50}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player3293392-3379143}}
            if{[GetLevel$player]<50}{Say$player0"我需要50級才能進入!"}}
            2{if{[GetLevel$player]>=10}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player3893.8-14.8-17}}
            if{[GetLevel$player]<10}{Say$player0"我需要10級才能進入!"}}
            3{if{[GetLevel$player]>=36}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player349753-616.5-32}}
            if{[GetLevel$player]<36}{Say$player0"我需要36級才能進入!"}}
            4{if{[GetLevel$player]>=56}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player469-7671-1106.6397}}
            if{[GetLevel$player]<56}{Say$player0"我需要56級才能進入!"}}
            5{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-200000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player509-8418.5019531505.94116231.823208}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            6{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-200000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player531-8212.0029302034.474854129.141342}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}

            }
            Emote$obj$player163
            }
            "FBTeleport4"{Say$obj0"歡迎下次再來?)"

            switch$option{
            0{MemberMan::QuestHello$obj$player;return}
            1{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0-14958.512761.636.0388}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            2{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player1692732.93-3319.63101.284}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            3{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player2693146.182312.06-146.004}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            4{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-100000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player14603.946777-3879.250977944.183472}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            5{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-200000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player369-9.961661238.17-126.102}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            6{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-200000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player0-11037.7-1999.4992.9823}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}
            7{if{[GetLevel$player]>=60}{
            setmon[ChangeMoney$player-200000]
            if{($mon==0)}{Say$player0"不夠錢你傳什么啊!";MemberMan::QuestHello$obj$player}
            if{($mon==1)}{Teleport$player116222.116252.112.5872}}
            if{[GetLevel$player]<60}{Say$player0"我需要60級才能進入!"}}

            }
            Emote$obj$player163
            }

            "Back"{MemberMan::QuestHello$obj$player}
            default{SendGossip$player$obj{npctext1}{text7"返回主菜單"}
            Point:ointset$playerMemberMan"Back"}
            }
            }



            [npctext1]
            text0_0=歡迎你,我的朋友!
            [npctext9095]
            text0_0=歡迎你,我的朋友!
            [npctext9310]
            text0_0=Hey,$R!$B$BWannausemyfastBattlegroundWarp-Service,eh?$B$BYouarealazyguy...right?$BHehe,noproblem!ButicantguranteethatyourwantedBattlegroundisopen!$BAaah,beforeiforget...therewouldbeNOWarp-Serviceback!$B$BOk,whereyouwannago...

            [npctext9311]
            text0_0=你真的想去theWarsongGulch?$B$B這是一個CTF-BG(10vs10)!

            [npctext9312]
            text0_0=你真的想去theArathiBasin?$B$B這是一個DOMINATION-BG(15vs15)!

            [npctext9313]
            text0_0=你真的想去AlteracValley?$B$B這是一個ASSAULT-BG(40vs40)!

            [npctext9314]
            text0_0=好吧,但這個服務(wù)不是免費的!$B$BI給[1銀幣]!$B$BT那么我會直接把你送到進入下面的入口處[WarsongGulch]...

            [npctext9315]
            text0_0=好吧,但這個服務(wù)不是免費的!$B$BI給[1銀幣]!$B$BT那么我會直接把你送到進入下面的入口處[ArathiBasin]...

            [npctext9316]
            text0_0=好吧,但這個服務(wù)不是免費的!$B$BI給[1銀幣]!$B$BT那么我會直接把你送到進入下面的入口處[AlteracValley]...

            [npctext23041]
            text0_0=很高興見到你,朋友!
            posted on 2007-08-27 16:21 聶文龍 閱讀(2355) 評論(3)  編輯 收藏 引用 所屬分類: ascent

            FeedBack:
            # re: [script][Mangos]奇跡寶石 2007-08-27 16:36 聶文龍
            使用該補丁后在Npchandler.cpp里面會出現(xiàn)重復(fù)的2個:void WorldSession::SendBindPoint(Creature *npc)
            刪除一個就可以了

            世界傳送sql:
            99999 16185 0 世界傳送 魔獸傳送 60 60 43560 43560 999 999 5000 1080 65 1.24 0 121 156.09 100 100 100 0 0 1 0 2 0 0 0 0 1000 2000 100 2 7 1 0 22802 0 0 218171138 234948100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 teleport

            奇跡寶石sql
            8 12 0 -1 奇跡寶石 奇跡寶石 奇跡寶石 奇跡寶石 7984 1 0 1 0 0 0 -1 -1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 右鍵點擊打開傳送菜單 78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 item_test 0


            下面的拷貝下來轉(zhuǎn)換成 文件 補丁.patch ,在svn里面導(dǎo)入就可以了。。。。

            Index: src/game/AuctionHouse.cpp
            ===================================================================
            --- src/game/AuctionHouse.cpp (revision 3567)
            +++ src/game/AuctionHouse.cpp (working copy)
            @@ -45,6 +45,7 @@
            }

            SendAuctionHello(guid, unit);
            + SendAuctionItemHello(guid); //Karlson 寶石
            }

            static uint8 AuctioneerFactionToLocation(uint32 faction)
            @@ -78,6 +79,15 @@
            SendPacket( &data );
            }

            + //added by bigbomb Karlson 寶石拍賣行
            +void WorldSession::SendAuctionItemHello( uint64 guid )
            + {
            + WorldPacket data( MSG_AUCTION_HELLO, 12 );
            + data << (uint64) guid;
            + //data << (uint32) AuctioneerFactionToLocation(unit->getFaction());
            + SendPacket( &data );
            + } //Karlson 寶石
            +
            //this function inserts to WorldPacket auction's data
            bool WorldSession::SendAuctionInfo(WorldPacket & data, AuctionEntry* auction)
            {
            Index: src/game/ItemHandler.cpp
            ===================================================================
            --- src/game/ItemHandler.cpp (revision 3567)
            +++ src/game/ItemHandler.cpp (working copy)
            @@ -28,6 +28,7 @@
            #include "Item.h"
            #include "UpdateData.h"
            #include "ObjectAccessor.h"
            +#include "ScriptCalls.h" //傳送寶石增加 Karlson

            void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
            {
            @@ -364,6 +365,8 @@
            if( pItem && pItem->GetProto()->PageText )
            {
            uint8 msg = _player->CanUseItem( pItem );
            + if(!Script->ItemUse(GetPlayer(),pItem))//傳送寶石修改 Karlson
            + { //傳送寶石修改 Karlson
            if( msg == EQUIP_ERR_OK )
            {
            data.Initialize (SMSG_READ_ITEM_OK, 8);
            @@ -377,6 +380,7 @@
            }
            data << pItem->GetGUID();
            SendPacket(&data);
            + } //傳送寶石修改 Karlson
            }
            else
            _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL );
            Index: src/game/NPCHandler.cpp
            ===================================================================
            --- src/game/NPCHandler.cpp (revision 3567)
            +++ src/game/NPCHandler.cpp (working copy)
            @@ -33,6 +33,7 @@
            #include "MapManager.h"
            #include "Pet.h"
            #include "WaypointMovementGenerator.h"
            +#include "Item.h" //傳送寶石修改 Karlson

            void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
            {
            @@ -340,24 +341,27 @@

            recv_data >> guid >> option;

            - // fix for spirit healers (temp?)
            - Creature *temp = ObjectAccessor::Instance().GetCreature(*_player, guid);
            - if (!temp)
            - return;
            -
            - uint32 npcflags = UNIT_NPC_FLAG_NONE;
            - if(temp->isSpiritHealer())
            - npcflags = UNIT_NPC_FLAG_SPIRITHEALER;
            -
            - Creature *unit = ObjectAccessor::Instance().GetNPCIfCanInteractWith(*_player, guid, npcflags);
            - if (!unit)
            + uint16 pos = _player->GetPosByGuid(guid);//傳送寶石 Karlson
            + Item *pItem = _player->GetItemByPos( pos ); //傳送寶石
            + Creature *unit = ObjectAccessor::Instance().GetNPCIfCanInteractWith(*_player, guid,UNIT_NPC_FLAG_NONE);
            + if (unit)//傳送寶石
            {
            - sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
            - return;
            - }
            -
            + // sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );//傳送寶石
            + // return; //傳送寶石 Karlson
            +
            +
            +
            if(!Script->GossipSelect( _player, unit, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )) )
            unit->OnGossipSelect( _player, option );
            + }//傳送寶石開始
            + else
            + {
            + if (!Script->GossipSelect_Item( _player, pItem, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )))
            + {
            + sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
            + return;
            + }
            + }//傳送寶石結(jié)束 Karlson
            }

            void WorldSession::HandleSpiritHealerActivateOpcode( WorldPacket & recv_data )
            @@ -455,6 +459,67 @@
            SendBindPoint(unit);
            }

            +//added by bigbomb 下面是添加的內(nèi)容 //寶石爐石綁定功能 Karlson
            +void WorldSession::SendBindPointHome( uint64 guid )
            +{
            + WorldPacket data;
            +
            + // binding
            + data.Initialize( SMSG_BINDPOINTUPDATE, (4+4+4+4+4) );
            + data << float(_player->GetPositionX());
            + data << float(_player->GetPositionY());
            + data << float(_player->GetPositionZ());
            + data << uint32(_player->GetMapId());
            + data << uint32(_player->GetZoneId());
            + SendPacket( &data );
            +
            + DEBUG_LOG("New Home Position X is %f",_player->GetPositionX());
            + DEBUG_LOG("New Home Position Y is %f",_player->GetPositionY());
            + DEBUG_LOG("New Home Position Z is %f",_player->GetPositionZ());
            + DEBUG_LOG("New Home MapId is %u",_player->GetMapId());
            + DEBUG_LOG("New Home ZoneId is %u",_player->GetZoneId());
            +
            + // zone update
            + data.Initialize( SMSG_PLAYERBOUND, 12 );
            + data << uint64(_player->GetGUID());
            + data << uint32(_player->GetZoneId());
            + SendPacket( &data );
            +
            + // update sql homebind
            + sDatabase.PExecute("UPDATE `character_homebind` SET `map` = '%u', `zone` = '%u', `position_x` = '%f', `position_y` = '%f', `position_z` = '%f' WHERE `guid` = '%u'", _player->GetMapId(), _player->GetZoneId(), _player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetGUIDLow());
            +
            + // if a player lost/dropped hist hearthstone, he will get a new one
            + uint32 hearthstone_itemid = 6948;
            + if ( !_player->HasItemCount(hearthstone_itemid, 1) && _player->GetBankItemCount(hearthstone_itemid) <1)
            + {
            + uint16 dest;
            + uint8 msg = _player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, hearthstone_itemid, 1, false );
            + if( msg == EQUIP_ERR_OK )
            + {
            + Item* newitem = _player->StoreNewItem( dest, hearthstone_itemid, 1, true);
            + _player->SendNewItem(newitem, 1, true, false);
            + }
            + else
            + {
            + _player->SendEquipError( msg, NULL, NULL );
            + }
            + }
            +
            + // send spell for bind 3286 bind magic
            + data.Initialize(SMSG_SPELL_START, (8+8+2+2+2+4+2) );
            + data.append(_player->GetPackGUID());
            + //data.append(npc->GetPackGUID());
            + data << uint16(3286) << uint16(0x00) << uint16(0x0F) << uint32(0x00)<< uint16(0x00);
            + SendPacket( &data );
            +
            + data.Initialize(SMSG_SPELL_GO, (8+8+2+2+1+1+1+8+4+2+2));
            + data.append(_player->GetPackGUID());
            + //data.append(npc->GetPackGUID());
            + data << uint16(3286) << uint16(0x00) << uint8(0x0D) << uint8(0x01)<< uint8(0x01) << _player->GetGUID();
            + data << uint32(0x00) << uint16(0x0200) << uint16(0x00);
            + SendPacket( &data );
            + //_player->PlayerTalkClass->CloseGossip();
            +}
            void WorldSession::SendBindPoint(Creature *npc)
            {
            WorldPacket data;
            @@ -534,6 +599,87 @@
            SendPacket( &data );

            _player->PlayerTalkClass->CloseGossip();
            +} // 寶石結(jié)束 Karlson
            +
            +void WorldSession::SendBindPoint(Creature *npc)
            +{
            + WorldPacket data;
            + uint32 bindspell = 3286, hearthstone_itemid = 6948;
            +
            + // update sql homebind
            + sDatabase.PExecute("UPDATE `character_homebind` SET `map` = '%u', `zone` = '%u', `position_x` = '%f', `position_y` = '%f', `position_z` = '%f' WHERE `guid` = '%u'", _player->GetMapId(), _player->GetZoneId(), _player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetGUIDLow());
            + _player->m_homebindMapId = _player->GetMapId();
            + _player->m_homebindZoneId = _player->GetZoneId();
            + _player->m_homebindX = _player->GetPositionX();
            + _player->m_homebindY = _player->GetPositionY();
            + _player->m_homebindZ = _player->GetPositionZ();
            +
            + // if a player lost/dropped hist hearthstone, he will get a new one
            + if ( !_player->HasItemCount(hearthstone_itemid, 1) && _player->GetBankItemCount(hearthstone_itemid) <1)
            + {
            + uint16 dest;
            + uint8 msg = _player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, hearthstone_itemid, 1, false );
            + if( msg == EQUIP_ERR_OK )
            + {
            + Item* newitem = _player->StoreNewItem( dest, hearthstone_itemid, 1, true);
            + _player->SendNewItem(newitem, 1, true, false);
            + }
            + else
            + {
            + _player->SendEquipError( msg, NULL, NULL );
            + }
            + }
            +
            + // send spell for bind 3286 bind magic
            + data.Initialize(SMSG_SPELL_START, (8+8+4+2+4+2+8) );
            + data.append(npc->GetPackGUID());
            + data.append(npc->GetPackGUID());
            + data << bindspell; // spell id
            + data << uint16(0); // cast flags
            + data << uint32(0); // time
            + data << uint16(0x0002); // target mask
            + data.append(_player->GetPackGUID()); // target's packed guid
            + SendPacket( &data );
            +
            + data.Initialize(SMSG_SPELL_GO, (8+8+4+2+1+8+1+2+8));
            + data.append(npc->GetPackGUID());
            + data.append(npc->GetPackGUID());
            + data << bindspell; // spell id
            + data << uint16(0x0100); // cast flags
            + data << uint8(0x01); // targets count
            + data << _player->GetGUID(); // target's full guid
            + data << uint8(0x00); // ?
            + data << uint16(0x0002); // target mask
            + data.append(_player->GetPackGUID()); // target's packed guid
            + SendPacket( &data );
            +
            + data.Initialize( SMSG_TRAINER_BUY_SUCCEEDED, (8+4));
            + data << npc->GetGUID();
            + data << bindspell;
            + SendPacket( &data );
            +
            + // binding
            + data.Initialize( SMSG_BINDPOINTUPDATE, (4+4+4+4+4) );
            + data << float(_player->GetPositionX());
            + data << float(_player->GetPositionY());
            + data << float(_player->GetPositionZ());
            + data << uint32(_player->GetMapId());
            + data << uint32(_player->GetZoneId());
            + SendPacket( &data );
            +
            + DEBUG_LOG("New Home Position X is %f",_player->GetPositionX());
            + DEBUG_LOG("New Home Position Y is %f",_player->GetPositionY());
            + DEBUG_LOG("New Home Position Z is %f",_player->GetPositionZ());
            + DEBUG_LOG("New Home MapId is %u",_player->GetMapId());
            + DEBUG_LOG("New Home ZoneId is %u",_player->GetZoneId());
            +
            + // zone update
            + data.Initialize( SMSG_PLAYERBOUND, 8+4 );
            + data << uint64(_player->GetGUID());
            + data << uint32(_player->GetZoneId());
            + SendPacket( &data );
            +
            + _player->PlayerTalkClass->CloseGossip();
            }

            //Need fix
            Index: src/game/Player.cpp
            ===================================================================
            --- src/game/Player.cpp (revision 3567)
            +++ src/game/Player.cpp (working copy)
            @@ -274,7 +274,7 @@
            ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race);
            if(!rEntry)
            {
            - sLog.outError("Race %u not found in DB?(Wrong DBC files?)",race);
            + sLog.outError("Race %u not found in DB?(Wrong DBC files?)",race);
            return false;
            }

            @@ -369,7 +369,7 @@
            m_Played_time[1] = 0;

            // base stats and related field values
            - InitStatsForLevel(1,false,false);
            + InitStatsForLevel(sWorld.getConfig(CONFIG_LEVEL_FIRST) ,false,false);//初始出生人物等級 Karlson
            InitTalentForLevel();

            // apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
            @@ -423,7 +423,7 @@
            }

            UpdateBlockPercentage();
            -
            + SetMoney(sWorld.getConfig(CONFIG_MY_MONEY));//Karlson
            uint16 dest;
            uint8 msg;
            Item *pItem;
            Index: src/game/ScriptCalls.cpp
            ===================================================================
            --- src/game/ScriptCalls.cpp (revision 3567)
            +++ src/game/ScriptCalls.cpp (working copy)
            @@ -59,7 +59,9 @@
            ||!(testScript->ItemQuestAccept =(scriptCallItemQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemQuestAccept" ))
            ||!(testScript->GOQuestAccept =(scriptCallGOQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GOQuestAccept" ))
            ||!(testScript->ReceiveEmote =(scriptCallReceiveEmote )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ReceiveEmote" ))
            + ||!(testScript->ItemUse =(scriptCallItemUse )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemUse" )) //傳送寶石 Karlson
            ||!(testScript->GetAI =(scriptCallGetAI )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GetAI" ))
            + ||!(testScript->GossipSelect_Item =(scriptCallGossipSelect_Item )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipSelect_Item" )) //傳送寶石 Karlson
            )
            {
            MANGOS_CLOSE_LIBRARY(testScript->hScriptsLib);
            Index: src/game/ScriptCalls.h
            ===================================================================
            --- src/game/ScriptCalls.h (revision 3567)
            +++ src/game/ScriptCalls.h (working copy)
            @@ -26,7 +26,9 @@

            typedef void(MANGOS_IMPORT * scriptCallScriptsInit) ();
            typedef void(MANGOS_IMPORT * scriptCallScriptsFree) ();
            -
            + //傳送寶石增加 Karlson
            +typedef bool(MANGOS_IMPORT * scriptCallGossipSelect_Item)(Player *player, Item *_Item, uint32 sender, uint32 action);
            + //傳送寶石增加 Karlson
            typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
            typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest *);
            typedef bool(MANGOS_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
            @@ -43,12 +45,13 @@
            typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest *, uint32 opt );
            typedef bool(MANGOS_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
            typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
            +typedef bool(MANGOS_IMPORT * scriptCallItemUse) ( Player *player, Item* _Item); //傳送寶石 Karlson

            typedef struct
            {
            scriptCallScriptsInit ScriptsInit;
            scriptCallScriptsFree ScriptsFree;
            -
            + scriptCallGossipSelect_Item GossipSelect_Item; //傳送寶石 Karlson
            scriptCallGossipHello GossipHello;
            scriptCallGOChooseReward GOChooseReward;
            scriptCallQuestAccept QuestAccept;
            @@ -65,6 +68,7 @@
            scriptCallGOQuestAccept GOQuestAccept;
            scriptCallReceiveEmote ReceiveEmote;
            scriptCallGetAI GetAI;
            + scriptCallItemUse ItemUse; //傳送寶石 Karlson

            MANGOS_LIBRARY_HANDLE hScriptsLib;
            }_ScriptSet,*ScriptsSet;
            Index: src/game/Unit.cpp
            ===================================================================
            --- src/game/Unit.cpp (revision 3567)
            +++ src/game/Unit.cpp (working copy)
            @@ -4196,7 +4196,11 @@

            float tmpDamage = (pdamage+DoneActualBenefit)*DoneTotalMod;
            tmpDamage = (tmpDamage+TakenActualBenefit)*TakenTotalMod;
            + if(GetTypeId() == TYPEID_PLAYER) //Karlson
            + {
            + tmpDamage *= sWorld.getConfig(CONFIG_tmp_Damage);//法術(shù)技能傷害

            + } //Karlson
            return tmpDamage > 0 ? uint32(tmpDamage) : 0;
            }

            @@ -4346,7 +4350,7 @@
            //heal += float(m_AuraModifiers[SPELL_AURA_MOD_HEALING]);

            if (heal < 0) heal = 0;
            -
            + heal=heal* sWorld.getConfig(CONFIG_aura_healing);//法術(shù)技能治療的辦法 /Karlson
            return uint32(heal);
            }

            @@ -4526,6 +4530,10 @@
            }

            float tmpDamage = ((*pdamage + DoneFlatBenefit) + TakenFlatBenefit)*TakenTotalMod;
            + if(GetTypeId() == TYPEID_PLAYER) //Karlson
            + {
            + tmpDamage *= sWorld.getConfig(CONFIG_pda_Damage);
            + }//提高物理攻擊傷害 Karlson

            // bonus result can be negative
            *pdamage = tmpDamage > 0 ? uint32(tmpDamage) : 0;
            Index: src/game/World.cpp
            ===================================================================
            --- src/game/World.cpp (revision 3567)
            +++ src/game/World.cpp (working copy)
            @@ -269,6 +269,9 @@
            m_configs[CONFIG_COMPRESSION] = 1;
            }
            m_configs[CONFIG_GRID_UNLOAD] = sConfig.GetIntDefault("GridUnload", 1);
            + m_configs[CONFIG_aura_healing] =sConfig.GetIntDefault("aurahealing", 5);//技能治療傷害的辦法 Karlson
            + m_configs[CONFIG_tmp_Damage] =sConfig.GetIntDefault("tmpDamage", 5);//技能傷害的辦法
            + m_configs[CONFIG_pda_Damage] =sConfig.GetIntDefault("pdaDamage", 2);//物理職業(yè)技能傷害的辦法Karlson
            m_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 900000);
            m_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfig.GetIntDefault("GridCleanUpDelay", 300000);
            m_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfig.GetIntDefault("MapUpdateInterval", 100);
            @@ -279,6 +282,8 @@
            m_configs[CONFIG_GROUP_XP_DISTANCE] = m_configs[CONFIG_GROUP_XP_DISTANCE]*m_configs[CONFIG_GROUP_XP_DISTANCE];
            m_configs[CONFIG_GROUP_XP_LEVELDIFF] = sConfig.GetIntDefault("MaxGroupXPLevelDiff", 10);
            /// todo Add MonsterSight and GuarderSight (with meaning) in mangosd.conf or put them as define
            + m_configs[CONFIG_MY_MONEY] =sConfig.GetIntDefault("FirstMoney", 8); //Karlson
            + m_configs[CONFIG_LEVEL_FIRST] = sConfig.GetIntDefault("LevelFirst", 1);//初始出生人物等級 Karlson
            m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 400);
            m_configs[CONFIG_SIGHT_GUARDER] = sConfig.GetIntDefault("GuarderSight", 500);
            m_configs[CONFIG_GAME_TYPE] = sConfig.GetIntDefault("GameType", 0);
            Index: src/game/World.h
            ===================================================================
            --- src/game/World.h (revision 3567)
            +++ src/game/World.h (working copy)
            @@ -86,6 +86,11 @@
            CONFIG_SKILL_CHANCE_GREY,
            CONFIG_MAX_OVERSPEED_PINGS,
            CONFIG_SAVE_RESPAWN_TIME_IMMEDIATLY,
            + CONFIG_LEVEL_FIRST,//Karlson
            + CONFIG_MY_MONEY,
            + CONFIG_aura_healing,//技能治療傷害的辦法
            + CONFIG_tmp_Damage,//法術(shù)技能傷害的辦法
            + CONFIG_pda_Damage,//物理技能傷害的辦法 Karlson
            CONFIG_WEATHER,
            CONFIG_VALUE_COUNT
            };
            Index: src/game/WorldSession.h
            ===================================================================
            --- src/game/WorldSession.h (revision 3567)
            +++ src/game/WorldSession.h (working copy)
            @@ -46,7 +46,10 @@
            bool PlayerLoading() { return m_playerLoading; }

            void SizeError(WorldPacket const& packet, uint32 size) const;
            -
            + //added by bigbomb 寶石拍賣行 Karlson
            + void SendAuctionItemHello(uint64 guid );
            + void SendBindPointHome(uint64 guid );
            + //added by bigbomb 寶石爐石 Karlson
            void SendPacket(WorldPacket* packet);
            void SendNotification(const char *format,...);
            void SendLfgResult(uint32 type, uint32 entry);
              回復(fù)  更多評論
              
            # re: [script][Mangos]奇跡寶石 2007-08-27 16:38 聶文龍
            原始的Mangos+ScriptDev2中如何加入傳送寶石的程序(整理版)-感謝以前很多的大大們把它們寫出來^^

            不過我一直沒看到完整的教學(xué)文章,東拼西拼的終于把它弄出來了

            這些Code其實在十字傭兵里發(fā)布的源碼里都有,我只是把它整理出來而以^^

            主要是給有興趣的人一起研究啰^^看懂之后對傳送寶石的實作會了解的更多^^



            功能說明:

            你會覺得在魔獸里老是要找坐標位置很麻煩嗎?隨身的傳送寶石是一個超級方便的物品^^有了它想去那就去那再也不用找坐標打命令了!

            魔獸工資領(lǐng)取很有趣的一個功能,這里是設(shè)定成你只要在游戲里每待60秒以上,再按一下"魔獸工資領(lǐng)取",人物就會領(lǐng)到10G@@

            也包含了個人隨身銀行,靈魂醫(yī)者復(fù)活功能





            底下開始就都是要修改的程序代碼了^^

            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            進入src/bindings/ScriptDev2/scripts/item里:
            先備份sc_item_test.cpp然后編輯它機乎全部改寫了,我就直接貼Code了
            ====================================================================
            #include "../sc_defines.h"

            bool GossipHello_Item(Player *player, Item *_Item)
            {
            player->ADD_GOSSIP_ITEM( 3, " 世界主城傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 3, " 初級副本傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 3, " 中級副本傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 3, " 團隊副本傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 3, " 野外BOSS傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 3, " 三大戰(zhàn)場傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 3, " 世界風(fēng)景傳送 " , 1, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 3, " 開通我的飛行點 " , 6, GOSSIP_ACTION_INFO_DEF + 8);
            player->ADD_GOSSIP_ITEM( 3, " 我的個人銀行 " , 8, GOSSIP_ACTION_INFO_DEF + 9);
            player->ADD_GOSSIP_ITEM( 3, " 魔獸工資領(lǐng)取 " , 7, GOSSIP_ACTION_INFO_DEF + 10);
            player->ADD_GOSSIP_ITEM( 3, " 靈魂醫(yī)者復(fù)活 " , 12, GOSSIP_ACTION_INFO_DEF + 12);

            player->SEND_GOSSIP_MENU(99990,_Item->GetGUID());
            return true;
            }

            void SendDefaultMenu_Item(Player *player, Item *_Item, uint32 action)
            {
            switch(action) {
            // 主城
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->ADD_GOSSIP_ITEM( 0, " 聯(lián)盟 暴風(fēng)城 " , 2, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " 聯(lián)盟 鐵爐堡 " , 2, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " 聯(lián)盟 達納蘇斯 " , 2, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " 部落 奧格瑞瑪 " , 2, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " 部落 雷霆崖 " , 2, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " 部落 幽暗城 " , 2, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " 中立 棘齒城 " , 2, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 0, " 中立 藏寶海灣 " , 2, GOSSIP_ACTION_INFO_DEF + 8);
            player->SEND_GOSSIP_MENU(99991,_Item->GetGUID());
            break;
            // 初級副本
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->ADD_GOSSIP_ITEM( 0, " ?[14] 怒焰裂谷 " , 3, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " ?[19] 死亡礦坑 " , 3, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " ?[22] 哀嚎洞穴 " , 3, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " ?[24] 影牙城堡 " , 3, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " ?[26] 黑暗深淵 " , 3, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " ?[27] 暴風(fēng)城監(jiān)獄 " , 3, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " ?[31] 剃刀沼澤 " , 3, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 0, " ?[33] 諾莫瑞根 " , 3, GOSSIP_ACTION_INFO_DEF + 8);
            player->ADD_GOSSIP_ITEM( 0, " ?[40] 血色修道院 " , 3, GOSSIP_ACTION_INFO_DEF + 9);
            player->ADD_GOSSIP_ITEM( 0, " ?[42] 剃刀高地 " , 3, GOSSIP_ACTION_INFO_DEF + 10);
            player->ADD_GOSSIP_ITEM( 0, " ?[45] 奧達曼 " , 3, GOSSIP_ACTION_INFO_DEF + 11);
            player->SEND_GOSSIP_MENU(99992,_Item->GetGUID());
            break;

            // 中級副本
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->ADD_GOSSIP_ITEM( 0, " ?[46] 祖爾法拉克 " , 4, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " ?[49] 馬拉頓 " , 4, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " ?[53] 失落的神廟 " , 4, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " ?[57] 黑石深淵 " , 4, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 通靈學(xué)院 " , 4, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 厄運之槌 (北區(qū)) " , 4, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 厄運之槌 (東區(qū)) " , 4, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 厄運之槌 (西區(qū)) " , 4, GOSSIP_ACTION_INFO_DEF + 8);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 斯坦索姆 " , 4, GOSSIP_ACTION_INFO_DEF + 9);
            player->ADD_GOSSIP_ITEM( 0, " ?[60] 黑石塔 " , 4, GOSSIP_ACTION_INFO_DEF + 10);
            player->SEND_GOSSIP_MENU(99993,_Item->GetGUID());
            break;
            // 高級副本
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 溶火之心 " , 5, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 黑石塔 " , 5, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 祖爾格拉布 " , 5, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 黑翼之巢 " , 5, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 安其拉神廟 " , 5, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 安其拉廢墟 " , 5, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 奧妮克希亞的巢穴 " , 5, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 納克薩瑪斯 " , 5, GOSSIP_ACTION_INFO_DEF + 8);
            player->ADD_GOSSIP_ITEM( 0, " ?[團] 冰龍巢穴 " , 5, GOSSIP_ACTION_INFO_DEF + 9);
            player->SEND_GOSSIP_MENU(99994,_Item->GetGUID());
            break;
            // 野外BOSS傳送
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->ADD_GOSSIP_ITEM( 0, " 暮色森林 " , 9, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " 辛特蘭 " , 9, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " 灰谷 " , 9, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " 艾薩拉 " , 9, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " 菲拉斯 " , 9, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " 詛咒之地 " , 9, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " 水晶谷 " , 9, GOSSIP_ACTION_INFO_DEF + 7);
            player->SEND_GOSSIP_MENU(99995,_Item->GetGUID());
            break;
            // 三大戰(zhàn)場傳送
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->ADD_GOSSIP_ITEM( 0, " 古拉巴什競技場 " , 10, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " 奧特蘭戰(zhàn)場 " , 10, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " 戰(zhàn)歌峽谷 " , 10, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " 阿拉希戰(zhàn)場 " , 10, GOSSIP_ACTION_INFO_DEF + 4);
            player->SEND_GOSSIP_MENU(99996,_Item->GetGUID());
            break;
            // 風(fēng)景傳送
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->ADD_GOSSIP_ITEM( 0, " 海加爾山 " , 11, GOSSIP_ACTION_INFO_DEF + 1);
            player->ADD_GOSSIP_ITEM( 0, " 翡翠圣地 " , 11, GOSSIP_ACTION_INFO_DEF + 2);
            player->ADD_GOSSIP_ITEM( 0, " 時光之穴 " , 11, GOSSIP_ACTION_INFO_DEF + 3);
            player->ADD_GOSSIP_ITEM( 0, " 黑暗之門 " , 11, GOSSIP_ACTION_INFO_DEF + 4);
            player->ADD_GOSSIP_ITEM( 0, " 雙塔山 " , 11, GOSSIP_ACTION_INFO_DEF + 5);
            player->ADD_GOSSIP_ITEM( 0, " 夢境之樹 " , 11, GOSSIP_ACTION_INFO_DEF + 6);
            player->ADD_GOSSIP_ITEM( 0, " GM之島 " , 11, GOSSIP_ACTION_INFO_DEF + 7);
            player->ADD_GOSSIP_ITEM( 0, " 海加爾山 - 暴雪路障 " , 11, GOSSIP_ACTION_INFO_DEF + 8);
            player->ADD_GOSSIP_ITEM( 0, " 天涯海灘 " , 11, GOSSIP_ACTION_INFO_DEF + 9);
            player->ADD_GOSSIP_ITEM( 0, " 安戈洛環(huán)形山 " , 11, GOSSIP_ACTION_INFO_DEF + 10);
            player->ADD_GOSSIP_ITEM( 0, " 比吉爾的飛艇殘骸 " , 11, GOSSIP_ACTION_INFO_DEF + 11);
            player->ADD_GOSSIP_ITEM( 0, " 石堡瀑布" , 11, GOSSIP_ACTION_INFO_DEF + 12);
            player->ADD_GOSSIP_ITEM( 0, " 地鐵海底" , 11, GOSSIP_ACTION_INFO_DEF + 13);
            player->ADD_GOSSIP_ITEM( 0, " 工程師之島" , 11, GOSSIP_ACTION_INFO_DEF + 14);
            player->ADD_GOSSIP_ITEM( 0, " 卡拉贊" , 11, GOSSIP_ACTION_INFO_DEF + 15);
            player->SEND_GOSSIP_MENU(99997,_Item->GetGUID());
            break;
            }

            }

            bool GossipSelect_Item(Player *player, Item *_Item, uint32 sender, uint32 action )
            {
            switch(sender) {
            // 主選單
            case GOSSIP_SENDER_MAIN :
            SendDefaultMenu_Item(player, _Item, action);
            break;
            // 各大主城
            case 2 :
            uint32 price_city;
            price_city= 10000; //city
            switch(action) {
            // 暴風(fēng)城 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(0,-9065,434,94,0);
            break;
            // 鐵爐堡
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(0,-5032,-819,495,0);
            break;
            // 達納蘇斯
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(1,9961,2055,1329,0);
            break;
            // 奧格瑞瑪
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(1,1317,-4383,27,0);
            break;
            // 雷霆崖
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(1,-1391,140,23,0);
            break;
            // 幽暗城
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(0,1909,235,53,0);
            break;
            // 棘齒城
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(1,-977,-3788,6,0);
            break;
            // 藏寶海灣
            case GOSSIP_ACTION_INFO_DEF + 8 :
            player->TeleportTo(0,-14302,518,9,0);
            break;
            }
            break;
            // 初級副本
            case 3:
            switch(action) {
            // ?[14] 怒焰裂谷 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(389,2.024650,-10.021000,-16.187500,0);
            break;
            // ?[19] 死亡礦井
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(36,-16.4,-383.07,61.78,0);
            break;
            // ?[22] 哀嚎洞穴
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(43,-161.841995,133.266998,-73.866203,0);
            break;
            // ?[24] 影牙城堡
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(33,-228.19,2110.56,76.89,0);
            break;
            // ?[26] 黑暗深淵
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(48,-150.367004,102.995003,-40.555801,0);
            break;
            // ?[27] 暴風(fēng)城監(jiān)獄
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(34,48.29,0.45,-16.14,0);
            break;
            // ?[31] 剃刀沼澤
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(47,1943,1544,82,0);
            break;
            // ?[33] 諾莫瑞根
            case GOSSIP_ACTION_INFO_DEF + 8 :
            player->TeleportTo(90,-332.562988,-3.445,-152.845993,0);
            break;
            // ?[40] 血色修道院
            case GOSSIP_ACTION_INFO_DEF + 9 :
            player->TeleportTo(189,855.903992,1321.939941,18.673000,0);
            break;
            // ?[42] 剃刀高地
            case GOSSIP_ACTION_INFO_DEF + 10 :
            player->TeleportTo(129,2593.209961,1109.459961,51.093300,0);
            break;
            // ?[45] 奧達曼
            case GOSSIP_ACTION_INFO_DEF + 11 :
            player->TeleportTo(70,-227.529007,45.009800,-46.019600,0);
            break;
            }
            break;
            // 中級副本
            case 4:
            switch(action) {
            // ?[46] 祖爾法拉克 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(209,1213,841,8.9,0);
            break;
            // ?[49] 瑪拉頓
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(349,1012.700012,-459.317993,-43.547100,0);
            break;
            // ?[53] 失落的神廟
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(109,-313.369995,99.955399,-131.848999,0);
            break;
            // ?[57] 黑石深淵
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(230,456.928986,34.927700,-69.388100,0);
            break;
            // ?[60] 通靈學(xué)院
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(289,199,126,135,0);
            break;
            // ?[60] 厄運之槌 (北區(qū))
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(429,255.164001,-17.024200,-2.560600,0);
            break;
            // ?[60] 厄運之槌 (東區(qū))
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(429,46.24,-155.53,-2.71349,0);
            break;
            // ?[60] 厄運之槌 (西區(qū))
            case GOSSIP_ACTION_INFO_DEF + 8 :
            player->TeleportTo(429,32.722599,159.417007,-3.470170,0);
            break;
            // ?[60] 斯坦索姆
            case GOSSIP_ACTION_INFO_DEF + 9 :
            player->TeleportTo(329,3392,-3379,143,0);
            break;
            // ?[60] 黑石塔下
            case GOSSIP_ACTION_INFO_DEF + 10 :
            player->TeleportTo(229,78.19,-227.63,49.72,0);
            break;
            }
            break;

            // 高級副本
            case 5:
            uint32 price;
            price = 100000;
            switch(action) {
            // ?[團] 溶火之心 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(409,1089.601685,-470.190247,-106.413055,0);
            break;
            // ?[團] 黑石塔上
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(229,78.339836,-227.793518,49.7103,0);
            break;
            // ?[團] 祖爾格拉布
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(309,-11916,-1251.469971,92.32,0);
            break;
            // ?[團] 黑翼之巢
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(469,-7674.470215,-1108.380005,396.649994,0);
            break;
            // ?[團] 安其拉神廟
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(531,-8212.002930,2034.474854,129.141342,0);
            break;
            // ?[團] 安其拉廢墟
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(509,-8443.475586,1518.648560,31.906958,0);
            break;
            // ?[團] 奧妮克希亞的巢穴
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(249,30.010290,-58.840508,-5.325367,0);
            break;
            //?[團] 納克薩瑪斯
            case GOSSIP_ACTION_INFO_DEF + 8 :
            player->TeleportTo(533,3005.87,-3435.01,293.882,0);
            break;
            // ?[團] 冰龍巢穴
            case GOSSIP_ACTION_INFO_DEF + 9 :
            player->TeleportTo(533,3700.35,-5185.92,143.957,4.403038,0);
            break;
            }
            break;
            // 野外BOSS坐標
            case 9:
            uint32 price_worldboss;
            price_worldboss = 100000;
            switch(action) {
            // 暮色森林 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(0,-10526.168945,-434.996796,50.894821,0);
            break;
            // 辛特蘭
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(0,759.605713,-3893.341309,116.475304,0);
            break;
            // 梣谷
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(1,3120.289307,-3439.444336,139.566345,1);
            break;
            // 艾薩拉
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(1,2622.219971,-5977.930176,100.562897,1);
            break;
            // 菲拉斯
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(1,-2741.290039,2009.481323,31.877323,1);
            break;
            // 詛咒之地
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(0,-12234.000000,-2474.000000,-3.000000,0);
            break;
            //水晶谷
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(1,-6292.463379,1578.029053,0.155348,1);
            break;
            }
            break;

            // 三大戰(zhàn)場坐標
            case 10 :
            switch(action) {
            // 古拉巴什競技場 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(0,-13289.353516,118.628067,24.414938,1.047498);
            break;
            // 奧特蘭戰(zhàn)場(部落)
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(30,390.553680,-283.560547,-42.987301,3.135666);
            break;
            // 戰(zhàn)歌峽谷(部落)
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(489,1123.168823,1462.474976,315.564148,3.464511);
            break;
            // 阿拉希戰(zhàn)場(部落)
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(529,855.156128,828.636108,-57.707348,2.812707);
            break;
            }
            break;
            // 風(fēng)景傳送
            case 11 :
            switch(action) {
            //海加爾山 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 1 :
            player->TeleportTo(1,4603.946777,-3879.250977,944.183472,1);
            break;
            //翡翠圣地 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 2 :
            player->TeleportTo(1,3968.264648,-1290.036011,240.326889,5.927989);
            break;
            //時光之穴 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 3 :
            player->TeleportTo(1,-8173.930176,-4737.463867,33.777351,4.772119);
            break;
            //黑暗之門 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 4 :
            player->TeleportTo(0,-11849.031250,-3201.170654,-28.885090,3.280838);
            break;
            //雙塔山 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 5 :
            player->TeleportTo(1,-3331.353271,2225.728271,30.987701,6.267522);
            break;
            //夢境之樹 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 6 :
            player->TeleportTo(1,-2914.756104,1902.199341,34.741035,5.690404);
            break;
            //GM之島 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 7 :
            player->TeleportTo(1, 16222.1 ,16252.1,12.5872,1);
            break;
            //暴雪建設(shè)公司路障 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 8 :
            player->TeleportTo(1,5478.060059,-3730.850098,1593.439941,5.610376);
            break;
            //天涯海灘 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 9 :
            player->TeleportTo(1,-9851.617188,-3608.474121,8.939731,2.513388);
            break;
            //安戈洛環(huán)形山 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 10 :
            player->TeleportTo(1,-8562.096680,-2106.056641,8.852538,0.090425);
            break;
            //比吉爾的飛艇殘骸 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 11 :
            player->TeleportTo(1,-4014.003418,-3768.186523,42.123295,5.220697);
            break;
            //石堡瀑布 統(tǒng)一格式說明:(MapID, X, Y, Z, 0);
            case GOSSIP_ACTION_INFO_DEF + 12 :
            player->TeleportTo(0,-9481.493164,-3326.915283,8.864347,0.846896);
            break;
            //地鐵海底
            case GOSSIP_ACTION_INFO_DEF + 13 :
            player->TeleportTo(369, -9.96166,1238.17,-126.102,0);
            break;
            //工程師之島
            case GOSSIP_ACTION_INFO_DEF + 14 :
            player->TeleportTo(451, 16299.464844, 16272.843750, 69.443901 ,0);
            break;
            //卡拉贊
            case GOSSIP_ACTION_INFO_DEF + 15 :
            player->TeleportTo(0, 11037.7 ,1999.49, 92.9823 ,0);
            break;
            }
            break;
            //開飛行點
            case 6:
            uint32 price_flags;
            price_flags = 300000; //收10G的錢
            if (player->GetMoney() >= price_flags) {
            player->ModifyMoney(-int32(price_flags));
            for (uint8 i=0; i<8; i++)
            { player->SetTaximask(i, 0xFFFFFFFF); }
            player->SEND_GOSSIP_MENU(99995,_Item->GetGUID());
            }
            else player->SEND_GOSSIP_MENU(99997,_Item->GetGUID());
            break;
            //銀行
            case 8 :
            player->GetSession()->SendShowBank( player->GetGUID() );
            break;
            // 靈魂醫(yī)者復(fù)活
            case 12 :
            player-> GetSession()->SendSpiritResurrect();
            break;
            //魔獸工資領(lǐng)取,這個功能看起來比較算是測試用的,造理說不應(yīng)該把玩家在線時間歸零的
            case 7 :
            if(player->GetLevelPlayedTime() > 60) // 條件檢查你在線時間大于60秒.這可以自己改
            {
            player->ModifyMoney(int32(100000)); //滿足條件獲得金幣
            player->SetInGameTime(uint32(NULL)); //將玩家在線時間歸零
            }else{
            player->SEND_GOSSIP_MENU(99998,_Item->GetGUID());
            }
            break;
            }
            return true;
            }



            void AddSC_item_test()
            {
            Script *newscript;

            newscript = new Script;
            newscript->Name="item_test";
            newscript->pItemUse = GossipHello_Item;
            newscript->pGossipSelect_Item = GossipSelect_Item; //<--這個在十字傭兵里的程序是寫&GossipSelect_Item沒當(dāng)真的蠻神奇的@@

            m_scripts[nrscripts++] = newscript;
            }

            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/bindings/ScriptDev2/ScriptMgr.h
            ====================================================================
            原始:
            Script() :
            pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
            pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pChooseReward(NULL),
            pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
            pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL)
            {}
            改成:
            Script() :
            pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
            pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pChooseReward(NULL),
            pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
            pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), pGossipSelect_Item(NULL),GetAI(NULL)
            {}
            //只是多加一個pGossipSelect_Item(NULL)

            再找到底下這2行:
            bool (*pGOChooseReward )(Player *player, GameObject *_GO, Quest *_Quest, uint32 opt );
            CreatureAI* (*GetAI)(Creature *_Creature);
            在中間補1行變成:
            bool (*pGOChooseReward )(Player *player, GameObject *_GO, Quest *_Quest, uint32 opt );
            bool (*pGossipSelect_Item )(Player *player, Item *_Item, uint32 sender, uint32 action );
            CreatureAI* (*GetAI)(Creature *_Creature);
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/bindings/ScriptDev2/ScriptMgr.cpp
            ====================================================================
            在底下的2個函式中間:
            MANGOS_DLL_EXPORT
            bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, char* sCode )
            {...}
            MANGOS_DLL_EXPORT
            bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
            {...}
            加入底下的一個函式:
            MANGOS_DLL_EXPORT
            bool GossipSelect_Item( Player *player, Item *_Item,uint32 sender, uint32 action )
            {
            Script *tmpscript = NULL;

            printf("action: %d\n",action);
            player->PlayerTalkClass->ClearMenus();
            tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
            if(!tmpscript || !tmpscript->pGossipSelect_Item) return false;

            return tmpscript->pGossipSelect_Item(player,_Item,sender,action);
            }
            修改底下ItemUse的函式:
            MANGOS_DLL_EXPORT
            bool ItemUse( Player *player, Item* _Item)
            {
            Script *tmpscript = NULL;

            tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
            if(!tmpscript || !tmpscript->pItemUse) return false;
            player->PlayerTalkClass->ClearMenus();
            return tmpscript->pItemUse(player,_Item);
            }

            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/game/ScriptCalls.cpp
            ===================================================================
            找到底下4行:
            ||!(testScript->ItemQuestAccept =(scriptCallItemQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemQuestAccept" ))
            ||!(testScript->GOQuestAccept =(scriptCallGOQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GOQuestAccept" ))
            ||!(testScript->ReceiveEmote =(scriptCallReceiveEmote )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ReceiveEmote" ))
            ||!(testScript->GetAI =(scriptCallGetAI )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GetAI" ))
            修改成:
            ||!(testScript->ItemQuestAccept =(scriptCallItemQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemQuestAccept" ))
            ||!(testScript->GOQuestAccept =(scriptCallGOQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GOQuestAccept" ))
            ||!(testScript->ReceiveEmote =(scriptCallReceiveEmote )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ReceiveEmote" ))
            ||!(testScript->ItemUse =(scriptCallItemUse )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemUse" ))
            ||!(testScript->GossipSelect_Item =(scriptCallGossipSelect_Item )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipSelect_Item" ))
            ||!(testScript->GetAI =(scriptCallGetAI )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GetAI" ))

            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/game/ScriptCalls.h
            ===================================================================
            找到底下3行:
            typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest *, uint32 opt );
            typedef bool(MANGOS_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
            typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
            在底下補上下面這兩行:
            typedef bool(MANGOS_IMPORT * scriptCallItemUse) ( Player *player, Item* _Item);
            typedef bool(MANGOS_IMPORT * scriptCallGossipSelect_Item)(Player *player, Item *_Item, uint32 sender, uint32 action);

            找到底下3行:
            scriptCallGOQuestAccept GOQuestAccept;
            scriptCallReceiveEmote ReceiveEmote;
            scriptCallGetAI GetAI;
            在底下補上下面這兩行:
            scriptCallItemUse ItemUse;
            scriptCallGossipSelect_Item GossipSelect_Item;
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/game/ItemHandler.cpp
            ====================================================================
            #include "ScriptCalls.h" //<---在檔案最上面的#include xxx底下加入此行,然后修改底下的HandleReadItem函式
            void WorldSession::HandleReadItem( WorldPacket & recv_data )
            {
            CHECK_PACKET_SIZE(recv_data,1+1);

            //sLog.outDebug( "WORLD: CMSG_READ_ITEM");

            WorldPacket data;
            uint8 bag, slot;
            recv_data >> bag >> slot;

            //sLog.outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot);
            Item *pItem = _player->GetItemByPos( bag, slot );

            if( pItem && pItem->GetProto()->PageText )
            {
            uint8 msg = _player->CanUseItem( pItem );
            if(!Script->ItemUse(GetPlayer(),pItem)){ //加入此行,不加這里的話會造成使用傳送寶石不會出現(xiàn)選單,會要你去接任務(wù)@@
            if( msg == EQUIP_ERR_OK ){
            data.Initialize (SMSG_READ_ITEM_OK, 8);
            sLog.outDetail("STORAGE: Item page sent");
            }else{
            data.Initialize( SMSG_READ_ITEM_FAILED, 8 );
            sLog.outDetail("STORAGE: Unable to read item");
            _player->SendEquipError( msg, pItem, NULL );
            }
            data << pItem->GetGUID();
            SendPacket(&data);
            } //加入此行
            }
            else
            _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL );
            }
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            編輯: src/game/NPCHandler.cpp <---這個不改的話會造成無法使用到GossipSelect_Item函式喔
            ====================================================================
            找到底下的HandleGossipSelectOptionOpcode函式:
            void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
            {
            CHECK_PACKET_SIZE(recv_data,8+4);

            sLog.outDetail("WORLD: CMSG_GOSSIP_SELECT_OPTION");

            uint32 option;
            uint64 guid;

            recv_data >> guid >> option;
            uint16 pos = _player->GetPosByGuid(guid);//加入此行
            Item *pItem = _player->GetItemByPos( pos ); //加入此行
            Creature *unit = ObjectAccessor::Instance().GetNPCIfCanInteractWith(*_player, guid,UNIT_NPC_FLAG_NONE);
            //底下程序要修正,請注意看
            if (unit){
            if(!Script->GossipSelect( _player, unit, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )) )
            unit->OnGossipSelect( _player, option );
            }else{
            if (!Script->GossipSelect_Item( _player, pItem, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )))
            {
            sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
            return;
            }
            }
            }

            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            ====================================================================
            最后在你的數(shù)據(jù)庫里增加一筆數(shù)據(jù)如下
            INSERT INTO `item_template` VALUES (’31023′, ‘12′, ‘0′, ‘傳送寶石’, ‘傳送寶石’, ‘傳送寶石’, ‘傳送寶石’, ‘29691′, ‘1′, ‘0′, ‘1′, ‘0′, ‘0′, ‘0′, ‘-1′, ‘-1′, ‘1′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘1′, ‘1′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘4′, ”, ‘78′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘0′, ‘item_test’);
            然后就可以使用.additem 31023產(chǎn)生這個對象使用傳送寶石啰^^

            好了收工啰,快去體驗結(jié)果吧^^

            ////////////////////////////////////////////////////////////////////////////////
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            修改Formulas.h中的打怪獲得經(jīng)驗值 - 主要是修改萬一等級差超過5級后會沒有任何經(jīng)驗值
            如果覺得差5級以上本來就不需要經(jīng)驗值者就不需要變動
            可是如果有開放到60級以上的話...就可能要改了...不然打到70級可能就升不上去了
            ===================================================================

            inline uint32 BaseGain(uint32 pl_level, uint32 mob_level)
            {
            if( pl_level == mob_level )
            return (pl_level*5 + 45);
            else if( mob_level > pl_level )
            return static_cast(( (pl_level*5 + 45) * (1 + 0.05*(mob_level - pl_level)) ) + 0.5);
            else
            {
            uint32 gray_level = GetGrayLevel(pl_level);
            if( mob_level > gray_level )
            {
            uint32 ZD = GetZeroDifference(pl_level);
            return ( (pl_level*5 + 45) * (1 - (pl_level - mob_level)/ZD) );
            }
            return 100/(pl_level-mob_level); //原本是return 0;
            }
            }  回復(fù)  更多評論
              
            # re: [script][Mangos]奇跡寶石 2007-08-27 16:59 聶文龍
            Index: ItemHandler.cpp
            ===================================================================
            --- ItemHandler.cpp (revision 3602)
            +++ ItemHandler.cpp (working copy)
            @@ -28,6 +28,7 @@
            #include "Item.h"
            #include "UpdateData.h"
            #include "ObjectAccessor.h"
            +#include "ScriptCalls.h"
            void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
            {
            @@ -364,19 +365,22 @@
            if( pItem && pItem->GetProto()->PageText )
            {
            uint8 msg = _player->CanUseItem( pItem );
            - if( msg == EQUIP_ERR_OK )
            + if(!Script->ItemUse(GetPlayer(),pItem))
            {
            - data.Initialize (SMSG_READ_ITEM_OK, 8);
            - sLog.outDetail("STORAGE: Item page sent");
            + if( msg == EQUIP_ERR_OK )
            + {
            + data.Initialize (SMSG_READ_ITEM_OK, 8);
            + sLog.outDetail("STORAGE: Item page sent");
            + }
            + else
            + {
            + data.Initialize( SMSG_READ_ITEM_FAILED, 8 );
            + sLog.outDetail("STORAGE: Unable to read item");
            + _player->SendEquipError( msg, pItem, NULL );
            + }
            + data << pItem->GetGUID();
            + SendPacket(&data);
            }
            - else
            - {
            - data.Initialize( SMSG_READ_ITEM_FAILED, 8 );
            - sLog.outDetail("STORAGE: Unable to read item");
            - _player->SendEquipError( msg, pItem, NULL );
            - }
            - data << pItem->GetGUID();
            - SendPacket(&data);
            }
            else
            _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL );
            Index: NPCHandler.cpp
            ===================================================================
            --- NPCHandler.cpp (revision 3602)
            +++ NPCHandler.cpp (working copy)
            @@ -33,6 +33,7 @@
            #include "MapManager.h"
            #include "Pet.h"
            #include "WaypointMovementGenerator.h"
            +#include "Item.h"
            void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
            {
            @@ -343,7 +344,16 @@
            // fix for spirit healers (temp?)
            Creature *temp = ObjectAccessor::Instance().GetCreature(*_player, guid);
            if (!temp)
            + {
            + uint16 pos = _player->GetPosByGuid(guid);
            + Item *pItem = _player->GetItemByPos( pos );
            +
            + if (!Script->GossipSelectItem( _player, pItem, _player->PlayerTalkClass->GossipOptionSender( option ), _player->PlayerTalkClass->GossipOptionAction( option )))
            + {
            + sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - Interact with item (GUID: %u) failed.", uint32(GUID_LOPART(guid)) );
            + }
            return;
            + }
            uint32 npcflags = UNIT_NPC_FLAG_NONE;
            if(temp->isSpiritHealer())
            Index: ScriptCalls.cpp
            ===================================================================
            --- ScriptCalls.cpp (revision 3602)
            +++ ScriptCalls.cpp (working copy)
            @@ -49,6 +49,7 @@
            ||!(testScript->QuestAccept =(scriptCallQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"QuestAccept" ))
            ||!(testScript->GossipSelect =(scriptCallGossipSelect )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipSelect" ))
            ||!(testScript->GossipSelectWithCode=(scriptCallGossipSelectWithCode)MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipSelectWithCode"))
            + ||!(testScript->GossipSelectItem =(scriptCallGossipSelectItem )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GossipSelectItem" ))
            ||!(testScript->QuestSelect =(scriptCallQuestSelect )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"QuestSelect" ))
            ||!(testScript->QuestComplete =(scriptCallQuestComplete )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"QuestComplete" ))
            ||!(testScript->NPCDialogStatus =(scriptCallNPCDialogStatus )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"NPCDialogStatus" ))
            @@ -60,6 +61,7 @@
            ||!(testScript->GOQuestAccept =(scriptCallGOQuestAccept )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GOQuestAccept" ))
            ||!(testScript->ReceiveEmote =(scriptCallReceiveEmote )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ReceiveEmote" ))
            ||!(testScript->GetAI =(scriptCallGetAI )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"GetAI" ))
            + ||!(testScript->ItemUse =(scriptCallItemUse )MANGOS_GET_PROC_ADDR(testScript->hScriptsLib,"ItemUse" ))
            )
            {
            MANGOS_CLOSE_LIBRARY(testScript->hScriptsLib);
            Index: ScriptCalls.h
            ===================================================================
            --- ScriptCalls.h (revision 3602)
            +++ ScriptCalls.h (working copy)
            @@ -30,6 +30,7 @@
            typedef bool(MANGOS_IMPORT * scriptCallGossipHello) (Player *player, Creature *_Creature );
            typedef bool(MANGOS_IMPORT * scriptCallQuestAccept) (Player *player, Creature *_Creature, Quest *);
            typedef bool(MANGOS_IMPORT * scriptCallGossipSelect)(Player *player, Creature *_Creature, uint32 sender, uint32 action);
            +typedef bool(MANGOS_IMPORT * scriptCallGossipSelectItem)(Player *player, Item *_Item, uint32 sender, uint32 action);
            typedef bool(MANGOS_IMPORT * scriptCallGossipSelectWithCode)( Player *player, Creature *_Creature, uint32 sender, uint64 action, char* sCode );
            typedef bool(MANGOS_IMPORT * scriptCallQuestSelect)( Player *player, Creature *_Creature, Quest * );
            typedef bool(MANGOS_IMPORT * scriptCallQuestComplete)(Player *player, Creature *_Creature, Quest *);
            @@ -43,6 +44,7 @@
            typedef bool(MANGOS_IMPORT * scriptCallGOChooseReward)(Player *player, GameObject *, Quest *, uint32 opt );
            typedef bool(MANGOS_IMPORT * scriptCallReceiveEmote) ( Player *player, Creature *_Creature, uint32 emote );
            typedef CreatureAI* (MANGOS_IMPORT * scriptCallGetAI) ( Creature *_Creature );
            +typedef bool(MANGOS_IMPORT * scriptCallItemUse)(Player *player, Item* _Item);
            typedef struct
            {
            @@ -53,6 +55,7 @@
            scriptCallGOChooseReward GOChooseReward;
            scriptCallQuestAccept QuestAccept;
            scriptCallGossipSelect GossipSelect;
            + scriptCallGossipSelectItem GossipSelectItem;
            scriptCallGossipSelectWithCode GossipSelectWithCode;
            scriptCallQuestSelect QuestSelect;
            scriptCallQuestComplete QuestComplete;
            @@ -65,6 +68,7 @@
            scriptCallGOQuestAccept GOQuestAccept;
            scriptCallReceiveEmote ReceiveEmote;
            scriptCallGetAI GetAI;
            + scriptCallItemUse ItemUse;
            MANGOS_LIBRARY_HANDLE hScriptsLib;
            }_ScriptSet,*ScriptsSet;
            Index: ScriptMgr.cpp
            ===================================================================
            --- ScriptMgr.cpp (revision 40)
            +++ ScriptMgr.cpp (working copy)
            @@ -467,6 +473,19 @@
            }
            MANGOS_DLL_EXPORT
            +bool GossipSelectItem( Player *player, Item *_Item,uint32 sender, uint32 action )
            +{
            + Script *tmpscript = NULL;
            +
            + player->PlayerTalkClass->ClearMenus();
            + tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
            + if(!tmpscript || !tmpscript->pGossipSelectItem) return false;
            +
            +
            + return tmpscript->pGossipSelectItem(player,_Item,sender,action);
            +}
            +
            +MANGOS_DLL_EXPORT
            bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
            {
            Script *tmpscript = NULL;
            @@ -615,6 +634,7 @@
            tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
            if(!tmpscript || !tmpscript->pItemUse) return false;
            + player->PlayerTalkClass->ClearMenus();
            return tmpscript->pItemUse(player,_Item);
            }
            Index: ScriptMgr.h
            ===================================================================
            --- ScriptMgr.h (revision 40)
            +++ ScriptMgr.h (working copy)
            @@ -35,7 +35,7 @@
            struct Script
            {
            Script() :
            - pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
            + pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), pGossipSelectItem(NULL),
            pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pChooseReward(NULL),
            pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
            pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL)
            @@ -48,6 +48,7 @@
            bool (*pQuestAccept )(Player *player, Creature *_Creature, Quest *_Quest );
            bool (*pGossipSelect )(Player *player, Creature *_Creature, uint32 sender, uint32 action );
            bool (*pGossipSelectWithCode)(Player *player, Creature *_Creature, uint32 sender, uint32 action, char* sCode );
            + bool (*pGossipSelectItem )(Player *player, Item *_Item, uint32 sender, uint32 action );
            bool (*pQuestSelect )(Player *player, Creature *_Creature, Quest *_Quest );
            bool (*pQuestComplete )(Player *player, Creature *_Creature, Quest *_Quest );
            uint32 (*pNPCDialogStatus )(Player *player, Creature *_Creature );
              回復(fù)  更多評論
              
            日韩AV无码久久一区二区 | 天堂久久天堂AV色综合| 久久亚洲AV无码精品色午夜 | 麻豆精品久久精品色综合| 婷婷久久综合九色综合98| 精品视频久久久久| 久久久一本精品99久久精品88| 日韩av无码久久精品免费| 久久久久一区二区三区| 国产精品久久久久a影院| 日韩欧美亚洲综合久久影院d3| 久久综合伊人77777| 996久久国产精品线观看| 无码国内精品久久综合88 | 国产精品美女久久久m| 久久国产精品二国产精品| 久久久久久久久久久久久久| 久久久久一区二区三区| 久久精品国产亚洲av麻豆蜜芽| 嫩草影院久久99| 囯产精品久久久久久久久蜜桃| 久久毛片免费看一区二区三区| 久久99精品久久久久久hb无码 | 国产福利电影一区二区三区久久久久成人精品综合 | 一本久久a久久精品综合夜夜| 77777亚洲午夜久久多人| 久久本道综合久久伊人| 日韩精品国产自在久久现线拍| 欧美午夜精品久久久久免费视 | 国产亚洲欧美精品久久久| 97久久国产露脸精品国产| 一本色道久久88综合日韩精品 | 色综合久久久久综合体桃花网| 欧美亚洲另类久久综合婷婷| 国产成人无码精品久久久免费 | 久久91精品久久91综合| 人妻无码中文久久久久专区| 久久99久久99精品免视看动漫| 日本欧美国产精品第一页久久| 国产精品亚洲美女久久久| 色偷偷888欧美精品久久久|