Dynasti | Date: Thursday, 2008-12-04, 11:52 PM | Message # 1 |
Private
Group: Users
Messages: 11
Status: Offline
| Ok i made a small simple system that get for you the information you want to have. If you need some id's or anything this will help you. System Code: Code // ° Mapmaking since 2006... // ° // ° // ° // °°°ÛÜ // °°X°ÛÛÛ ÛÛÛÛÛÛÛÛ ÿÜÛÛÛÛÛÛÛÛÜ // °°XX° ÛÛÛ ßÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛ // °XX ° ÛÛÛÛ ÛÛÛÛÜ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ // °XX ° ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛß ßÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ // °°XXX°° ÛÛÛÛÛÛÜ ÛÛÛÜ ÛÛÛÛÛ ßÛÛÛÛÛ ßÛÛÛÛ ÛÛÛÛÛÛ // °°°°°°°° ÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÜ // ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛ ÛÛÛÛÛÜ ÛÛÛÛ // °°°°°°°° ÛÛÛÛÛÛÛÛÛ ÛÛÛÛÜ ÛÛÛÛÜ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÜ ÜÛÛÛÛÛÛ // °°XXXXX° ÛÛÛÛ ÛÛÛÜ ÛÛÛÛÛ ÛÛÛÛÛÛÜ ßÛÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ // °°XXXXX °° ÛÛÛÛ ÛÛÛÛÜ ÛÛÛÛ °°°ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ°°° ÛÛÛÛÛÛÛÛÛÛÛÛÛß // ° XXXXX °°ÛÛÛÛÛ°°°°ÛÛÛÛÛÛÛÛ°°XX ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ XXX°°ÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛ // °° XXXXX ÜÛÛÛÛÛÛ X ÛÛÛÛÛÛÛÛÛ XXX ÛÛÛÛÛÛÛÛÛÛÛ XXXXXX ÛÛÛÛÛÛÛ° ÛÛÛ // °° XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX °°°°°° °°°° // °° XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX °°°°°X°° // °°° XXXXXXXXXX °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° XXXXXXXXXXXXXXXXX°° // °°°°°°°°°°°°°°°° °°°°°°°° XXXXXXX °°° // °°°°°° XX °° // ...2008 and still moving on. °°°°°°° // °° // Screen Solution: 1280x1024 Visit [url=http://www.ngo.clan.su]Clan NgO - Main page[/url]! // // * * * * * * * * * * * * * * * * * // * Check System v1.1 by Dynasti * // * * * * * * * * * * * * * * * * * library CheckSystem initializer Init
globals private trigger CheckWidget = CreateTrigger() private trigger CheckPoint = CreateTrigger() private trigger CheckOrder = CreateTrigger()
private constant string OrderedUnitColor = "|cff00ff00" private constant string OrderColor = "|cffffcc00" private constant string OrderIdColor = "|cffffcc00" private constant string OrderPointColor = "|cffffcc00" private constant string OrderTargetItemColor = "|cFF00ffff" private constant string OrderTargetDestructableColor = "|cff004000" private constant string OrderTargetUnitColor = "|cffff0000" private constant string CordinatesColor = "|cffffcc00"
private constant string ErrorColor = "|cffff0000"
private constant string CommonTextColor = "|cffffffff"
private constant real TextLife = 10.
endglobals
private function OrderOrder takes string order, player p, integer orderid, unit u returns nothing call DisplayTimedTextToPlayer(p,0,0,TextLife,"\n"+CommonTextColor+"Unit|r "+OrderedUnitColor+GetUnitName(u)+"|r"+CommonTextColor+" Is ordered to "+OrderPointColor+order+"|r"+CommonTextColor+"(|r"+OrderIdColor+I2S(orderid)+"|r"+CommonTextColor+")"+"|r\n") endfunction
private function OrderPoint takes string order, player p, real x, real y, integer orderid, unit u returns nothing call DisplayTimedTextToPlayer(p,0,0,TextLife,"\n"+CommonTextColor+"Unit|r "+OrderedUnitColor+GetUnitName(u)+"|r"+CommonTextColor+" Is ordered to "+OrderPointColor+order+"|r"+CommonTextColor+"(|r"+OrderIdColor+I2S(orderid)+"|r"+CommonTextColor+")"+"|r"+CommonTextColor+" at location (|r"+CordinatesColor+R2S(x)+CommonTextColor+",|r"+CordinatesColor+R2S(y)+CommonTextColor+")"+"\n") endfunction
private function OrderTargetItem takes string order, player p, item i, integer orderid, unit u returns nothing call DisplayTimedTextToPlayer(p,0,0,TextLife,"\n"+CommonTextColor+"Unit|r "+OrderedUnitColor+GetUnitName(u)+"|r"+CommonTextColor+" Is ordered to "+OrderColor+order+"|r"+CommonTextColor+"(|r"+OrderIdColor+I2S(orderid)+"|r"+CommonTextColor+")"+CommonTextColor+"on item|r "+OrderTargetItemColor+GetItemName(i)+"|r"+CommonTextColor+" at location (|r"+CordinatesColor+R2S(GetItemX(i))+CommonTextColor+",|r"+CordinatesColor+R2S(GetItemY(i))+CommonTextColor+")"+"\n") endfunction
private function OrderTargetUnit takes string order, player p, unit t, integer orderid, unit u returns nothing call DisplayTimedTextToPlayer(p,0,0,TextLife,"\n"+CommonTextColor+"Unit|r "+OrderedUnitColor+GetUnitName(u)+"|r"+CommonTextColor+" Is ordered to "+OrderColor+order+"|r"+CommonTextColor+"(|r"+OrderIdColor+I2S(orderid)+"|r"+CommonTextColor+")"+CommonTextColor+"on unit|r "+OrderTargetUnitColor+GetUnitName(t)+"|r"+CommonTextColor+" at location (|r"+CordinatesColor+R2S(GetUnitX(t))+CommonTextColor+",|r"+CordinatesColor+R2S(GetUnitY(t))+CommonTextColor+")"+"\n") endfunction
private function OrderTargetDestructable takes string order, player p, destructable d, integer orderid, unit u returns nothing call DisplayTimedTextToPlayer(p,0,0,TextLife,"\n"+CommonTextColor+"Unit|r "+OrderedUnitColor+GetUnitName(u)+"|r"+CommonTextColor+" Is ordered to "+OrderColor+order+"|r"+CommonTextColor+"(|r"+OrderIdColor+I2S(orderid)+"|r"+CommonTextColor+")"+CommonTextColor+"on destructable|r "+OrderTargetDestructableColor+GetDestructableName(d)+"|r"+CommonTextColor+" at location (|r"+CordinatesColor+R2S(GetDestructableX(d))+CommonTextColor+",|r"+CordinatesColor+R2S(GetDestructableY(d))+CommonTextColor+")"+"\n") endfunction
private function FilterWidget takes nothing returns boolean local player p=GetOwningPlayer(GetTriggerUnit()) if GetOrderTargetUnit() != null then call OrderTargetUnit(OrderId2String(GetIssuedOrderId()),p,GetOrderTargetUnit(),GetIssuedOrderId(),GetTriggerUnit()) elseif GetOrderTargetItem() != null then call OrderTargetItem(OrderId2String(GetIssuedOrderId()),p,GetOrderTargetItem(),GetIssuedOrderId(),GetTriggerUnit()) elseif GetOrderTargetDestructable() != null then call OrderTargetDestructable(OrderId2String(GetIssuedOrderId()),p,GetOrderTargetDestructable(),GetIssuedOrderId(),GetTriggerUnit()) endif set p=null return false endfunction
private function FilterPoint takes nothing returns boolean local player p=GetOwningPlayer(GetTriggerUnit()) call OrderPoint(OrderId2String(GetIssuedOrderId()),p,GetOrderPointX(),GetOrderPointY(),GetIssuedOrderId(),GetTriggerUnit()) set p=null return false endfunction
private function FilterOrder takes nothing returns boolean local player p=GetOwningPlayer(GetTriggerUnit()) call OrderOrder(OrderId2String(GetIssuedOrderId()),p,GetIssuedOrderId(),GetTriggerUnit()) set p=null return false endfunction
function CheckWidgetOrder takes boolean condition returns nothing if condition == false then if IsTriggerEnabled(CheckWidget) then call DisableTrigger(CheckWidget) call BJDebugMsg("\n"+CommonTextColor+"CheckWidget System Disabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Disable a Disabled Trigger!|r\n") endif else if not IsTriggerEnabled(CheckWidget) then call EnableTrigger(CheckWidget) call BJDebugMsg("\n"+CommonTextColor+"CheckWidget System Enabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Enable an Enabled Trigger!|r\n") endif endif endfunction
function CheckPointOrder takes boolean state returns nothing if state == false then if IsTriggerEnabled(CheckPoint) then call DisableTrigger(CheckPoint) call BJDebugMsg("\n"+CommonTextColor+"CheckPoint System Disabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Disable a Disabled Trigger!|r\n") endif else if not IsTriggerEnabled(CheckPoint) then call EnableTrigger(CheckPoint) call BJDebugMsg("\n"+CommonTextColor+"CheckPoint System Enabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Enable an Enabled Trigger!|r\n") endif endif endfunction
function CheckOrderOrder takes boolean state returns nothing if state == false then if IsTriggerEnabled(CheckOrder) then call DisableTrigger(CheckOrder) call BJDebugMsg("\n"+CommonTextColor+"CheckOrder System Disabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Disable a Disabled Trigger!|r\n") endif else if not IsTriggerEnabled(CheckOrder) then call EnableTrigger(CheckOrder) call BJDebugMsg("\n"+CommonTextColor+"CheckOrder System Enabled!|r\n") else call BJDebugMsg("\n"+ErrorColor+"Cannot Enable an Enabled Trigger!|r\n") endif endif endfunction //=========================================================================== private function Init takes nothing returns nothing local integer index=0 local player p=null loop set p=Player(index) call TriggerRegisterPlayerUnitEvent(CheckWidget,p,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null) call TriggerRegisterPlayerUnitEvent(CheckPoint,p,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null) call TriggerRegisterPlayerUnitEvent(CheckOrder,p,EVENT_PLAYER_UNIT_ISSUED_ORDER,null) set p=null set index=index+1 exitwhen index==bj_MAX_PLAYER_SLOTS endloop call TriggerAddCondition(CheckWidget,Condition(function FilterWidget)) call TriggerAddCondition(CheckPoint,Condition(function FilterPoint)) call TriggerAddCondition(CheckOrder,Condition(function FilterOrder)) call DisableTrigger(CheckWidget) call DisableTrigger(CheckPoint) call DisableTrigger(CheckOrder) endfunction
endlibrary Please post ways of improvement. Enjoy... Example Map: Check System v1.w3x
If you got it, then.. Yeah what do you get realy?
Message edited by Dynasti - Friday, 2008-12-05, 0:24 AM |
|
| |
Hanky | Date: Friday, 2008-12-05, 3:26 PM | Message # 2 |
Lieutenant colonel
Group: Moderators
Messages: 116
Status: Offline
| Good job, Dynasti, this could be useful to get IDs.
Made by Smoe reworked by GiR aka Darkt3mpl3r
|
|
| |