snowtiger11 General
Alter : 26Ort : Im Königreich MankelAnmeldedatum : 17.04.09 Thema: Re: basengebäude nicht baubar fehlermeldung .... Mi Aug 11, 2010 12:45 pm ok es geht doch jetzt kommt immer wen ich es anfasse "warte bis die einstellungen vorgenommen worden
also hab ich es duplieziert hab die ID geändert doch ich weiß ned was ich nun im script ändern soll , die fehlermeldung hab ich schon gefunden ....
EDIT :
habs hinbekommen
ein weiterer kleiner scripterfolg
doch munition is dafür nie kaufbar why ?
hier is der script (sry sehr lang ich weiß ned was davon wichtig is )
Spoiler: /*-- Basebuilder --*/ #strict local pClnk, iTeam; local iEnd, iBallon, iMagic, iSell, iPlans, iDeco, iUnlocked; local IsOn; func Initialize() { iTeam = 1; ScheduleCall(this(),"Festwerding",100); IsOn = 0; iEnd = 0; iBallon = 0; iSell = 0; iMagic = 0; iPlans = 0; iDeco = 0; if(GetX(this()) > 1000) { iTeam = 2; } } public func AllowDeco(bool allow) { if(allow == true) { iDeco = 1; } else { iDeco = 0; } } public func AllowPlans(bool allow) { if(allow == true) { iPlans = 1; } else { iPlans = 0; } } public func AllowSell(bool allow) { if(allow == true) { iSell = 1; } else { iSell = 0; } } protected func Festwerding() { SetAction("Fliegen"); } protected func ControlDig(caller) { pClnk = FindObject2(Find_Distance(20),Find_ID(KNIG),Find_Action("Push")); if(IsOn == 0) { if (GetPlayerTeam(GetOwner(pClnk)) == iTeam || FindObject(UNLO)) { CreateMenu(GetID(), pClnk, 0, 0, 0, 0, 0, 1); AddMenuItem("Basis bauen", "Build", HUT3, pClnk); if(iEnd == 1) AddMenuItem("Kanonen kaufen", "BuyCannon", CTW5, pClnk); AddMenuItem("Items kaufen", "BuyItems(pClnk)", ARWP, pClnk); if(iEnd == 1) AddMenuItem("Munition kaufen", "BuyAmmo", FLNT, pClnk); if(iMagic == 1 && iEnd == 1) { AddMenuItem("Zaubersprüche", "BuyScrolls", SCRL, pClnk); } if(iDeco == 1) { AddMenuItem("Dekoration", "BuyDeco", BED1, pClnk); } if(iSell == 1) { AddMenuItem("Gegenstände verkaufen", "SellItem", SELL, pClnk); } return(1); } else { Sound("Error"); return(1); } } } public func AllowMagic(bool allow) { if(allow == true) { iMagic = 1; } else { iMagic = 0; } } public func SetOn() { Message("Automat wurde aktiviert!",this()); Sound("Start"); IsOn = 1; } public func IsEnd() { iEnd = 1; } public func AllowBallon(bool allow) { if(allow == true) { iBallon = 1; } else { iBallon = 0; } } public func Build() { var pRaster; if (!FindObject2(Find_ID(RASR), Find_Owner(GetOwner(pClnk)))) { //Raster erstellen pRaster = CreateObject(RASR, -6, 6, GetOwner(pClnk)); MakeCrewMember(pRaster, GetOwner(pClnk)); //Damit auch ja nicht geschummelt wird: SetCrewEnabled( 0, GetCrew(GetOwner(pClnk), 1)); } else { Sound("Error"); Message("Da baut schon jemand!", this()); } } public func BuyCannon() { //Kaufmenü für Kanonen und Bausätze für Kanonentürme CreateMenu(CTW5, pClnk, this(), C4MN_Extra_Value, "...", 0,0,true); //Die verschiedenen Kanonentypen. AddMenuItem("Bausatz", "ItemBuy(CNKT)", CNKT, pClnk); AddMenuItem("Luftabwehrgeschütz", "ItemBuy(CTW7)", CTW7, pClnk); AddMenuItem("Kampfgeschütz", "ItemBuy(CTW3)", CTW3, pClnk); AddMenuItem("Artilleriegeschütz", "ItemBuy(CTW5)", CTW5, pClnk); AddMenuItem("Flammenwerfer","ItemBuy(ACT1)",ACT1,pClnk); AddMenuItem("Blitzgeschütz","ItemBuy(ACT3)",ACT3,pClnk); AddMenuItem("Flüssigkeitengeschütz","ItemBuy(LICN)",LICN,pClnk); if(iBallon == 1) { AddMenuItem("Ballon","ItemBuy(BALN)",BALN,pClnk); AddMenuItem("Luftschiff","ItemBuy(BLMP)",BLMP,pClnk); } AddMenuItem("Armbrust","ItemBuy(XBOW)",XBOW,pClnk); AddMenuItem("Katapult","ItemBuy(CATA)",CATA,pClnk); AddMenuItem("Kanone","ItemBuy(CANN)",CANN,pClnk); AddMenuItem("Lore","ItemBuy(LORY)",LORY,pClnk); AddMenuItem("Kiste","ItemBuy(CHST)",CHST,pClnk); } public func BuyItems() { CreateMenu(ARWP, pClnk, this(), C4MN_Extra_Value,0,0,0,1); AddMenuItem("Bausatz","ItemBuy(CNKT)",CNKT,pClnk); AddMenuItem("Leitungsbausatz","ItemBuy(LNKT)",LNKT,pClnk); if(iPlans == 1) { AddMenuItem("Burgbaupläne","ItemBuy(CPPL)",CPPL,pClnk); AddMenuItem("Waffenpläne","ItemBuy(WPPL)",WPPL,pClnk); } AddMenuItem("Keks","ItemBuy(COKI)",COKI,pClnk); AddMenuItem("Brot","ItemBuy(BRED)",BRED,pClnk); AddMenuItem("Sand","ItemBuy(SAND)",SAND,pClnk); AddMenuItem("Erde","ItemBuy(ERTH)",ERTH,pClnk); AddMenuItem("Lehm","ItemBuy(LOAM)",LOAM,pClnk); AddMenuItem("Metall","ItemBuy(METL)",METL,pClnk); AddMenuItem("Beton","ItemBuy(CNCR)",CNCR,pClnk); AddMenuItem("Granit","ItemBuy(LIQG)",LIQG,pClnk); AddMenuItem("Kristall","ItemBuy(CRYS)",CRYS,pClnk); AddMenuItem("Holz","ItemBuy(WOOD)",WOOD,pClnk); AddMenuItem("Stein","ItemBuy(ROCK)",ROCK,pClnk); AddMenuItem("Gold","ItemBuy(GOLD)",GOLD,pClnk); AddMenuItem("Fass","ItemBuy(BARL)",BARL,pClnk); AddMenuItem("Wasserfass","ItemBuy(WBRL)",WBRL,pClnk); AddMenuItem("Säurefass","ItemBuy(ABRL)",ABRL,pClnk); AddMenuItem("Lavafass","ItemBuy(LBRL)",LBRL,pClnk); AddMenuItem("Ölfass","ItemBuy(OBRL)",OBRL,pClnk); AddMenuItem("Knochen","ItemBuy(BONE)",BONE,pClnk); AddMenuItem("Schädel","ItemBuy(SKUL)",SKUL,pClnk); AddMenuItem("Muschel","ItemBuy(SHEL)",SHEL,pClnk); AddMenuItem("Schmiedeeisen","ItemBuy(ANML)",ANML,pClnk); AddMenuItem("Schwert","ItemBuy(SWOR)",SWOR,pClnk); AddMenuItem("Bogen","ItemBuy(BOW1)",BOW1,pClnk); AddMenuItem("Speer","ItemBuy(SPER)",SPER,pClnk); AddMenuItem("Schild","ItemBuy(SHIE)",SHIE,pClnk); AddMenuItem("Rüstung","ItemBuy(ARMR)",ARMR,pClnk); AddMenuItem("Schwarze Rüstung","ItemBuy(BRMR)",BRMR,pClnk); AddMenuItem("Banner","ItemBuy(BANP)",BANP,pClnk); AddMenuItem("Zielscheibe","ItemBuy(ARCH)",ARCH,pClnk); AddMenuItem("Feuertrank","ItemBuy(PFIR)",PFIR,pClnk); AddMenuItem("Heiltrank","ItemBuy(PHEA)",PHEA,pClnk); AddMenuItem("Immunitätstrank","ItemBuy(PIMM)",PIMM,pClnk); AddMenuItem("Monstertrank","ItemBuy(PMON)",PMON,pClnk); AddMenuItem("Steintrank","ItemBuy(PSTO)",PSTO,pClnk); AddMenuItem("Wipftrank","ItemBuy(PWIP)",PWIP,pClnk); } public func BuyAmmo() { CreateMenu(FLNT, pClnk, this(), C4MN_Extra_Value,0,0,0,1); AddMenuItem("Schießpulver","ItemBuy(GUNP)",GUNP,pClnk); AddMenuItem("Schneeball","ItemBuy(SNWB)",SNWB,pClnk); AddMenuItem("Feuerklumpen","ItemBuy(FRBL)",FRBL,pClnk); AddMenuItem("T-Flint","ItemBuy(TFLN)",TFLN,pClnk); AddMenuItem("Super-T-Flint","ItemBuy(STFN)",STFN,pClnk); AddMenuItem("Flint","ItemBuy(FLNT)",FLNT,pClnk); AddMenuItem("Super-Flint","ItemBuy(SFLN)",SFLN,pClnk); AddMenuItem("Tera-Flint","ItemBuy(EFLN)",EFLN,pClnk); AddMenuItem("Monsterei","ItemBuy(MEGG)",MEGG,pClnk); AddMenuItem("Feuermonsterei","ItemBuy(FMEG)",FMEG,pClnk); AddMenuItem("Zapnest","ItemBuy(ZAPN)",ZAPN,pClnk); AddMenuItem("Brandbombe","ItemBuy(FBMP)",FBMP,pClnk); AddMenuItem("Pfeilpaket","ItemBuy(ARWP)",ARWP,pClnk); AddMenuItem("Brandpfeilpaket","ItemBuy(FARP)",FARP,pClnk); AddMenuItem("Sprengpfeilpaket","ItemBuy(XARP)",XARP,pClnk); AddMenuItem("Munitionspaket","ItemBuy(ADM1)",ADM1,pClnk); AddMenuItem("Batterie","ItemBuy(ADM3)",ADM3,pClnk); AddMenuItem("Schlange","ItemBuy(SNKE)",SNKE,pClnk); AddMenuItem("Wipf","ItemBuy(WIPF)",WIPF,pClnk); AddMenuItem("Fisch","ItemBuy(FISH)",FISH,pClnk); AddMenuItem("Pilz","ItemBuy(MUSH)",MUSH,pClnk); } public func BuyScrolls() { CreateMenu(FLNT, pClnk, this(), C4MN_Extra_Value,0,0,0,1); AddMenuItem("Verblenden","ScrollBuy(LGCN)",LGCN,pClnk); AddMenuItem("Tarnen","ScrollBuy(CMFG)",CMFG,pClnk); AddMenuItem("Löschen","ScrollBuy(EXTG)",EXTG,pClnk); AddMenuItem("Wind","ScrollBuy(MWND)",MWND,pClnk); AddMenuItem("Hitze","ScrollBuy(HEAT)",HEAT,pClnk); AddMenuItem("Frostige Zeiten","ScrollBuy(FZTM)",FZTM,pClnk); AddMenuItem("Erdbeben","ScrollBuy(MQKE)",MQKE,pClnk); AddMenuItem("Blitz","ScrollBuy(MLGT)",MLGT,pClnk); AddMenuItem("Ewige Flamme","ScrollBuy(ETFL)",ETFL,pClnk); AddMenuItem("Feuerball","ScrollBuy(MFRB)",MFRB,pClnk); AddMenuItem("Flammenwand","ScrollBuy(MFWL)",MFWL,pClnk); AddMenuItem("Feuerbann","ScrollBuy(FBAN)",FBAN,pClnk); AddMenuItem("Magische Brücke","ScrollBuy(MBRG)",MBRG,pClnk); AddMenuItem("Kraftfeldwand","ScrollBuy(MFFW)",MFFW,pClnk); AddMenuItem("Kleines Kraftfeld","ScrollBuy(MFFS)",MFFS,pClnk); AddMenuItem("Luftschutzkraftfeld","ScrollBuy(MFFA)",MFFA,pClnk); AddMenuItem("Gravitation senken","ScrollBuy(MGDW)",MGDW,pClnk); AddMenuItem("Gravitation steigern","ScrollBuy(MGUP)",MGUP,pClnk); AddMenuItem("Gravitationsschild","ScrollBuy(GVTY)",GVTY,pClnk); AddMenuItem("Heilen","ScrollBuy(MGHL)",MGHL,pClnk); AddMenuItem("Elixier","ScrollBuy(ELX1)",ELX1,pClnk); AddMenuItem("Genesung","ScrollBuy(ELX2)",ELX2,pClnk); AddMenuItem("Steinschild","ScrollBuy(MSSH)",MSSH,pClnk); AddMenuItem("Luftstoß","ScrollBuy(ABLA)",ABLA,pClnk); AddMenuItem("Blutsauger","ScrollBuy(MBLS)",MBLS,pClnk); AddMenuItem("Eisschlag","ScrollBuy(MICS)",MICS,pClnk); AddMenuItem("Eiskrähe beschwören","ScrollBuy(SMIC)",SMIC,pClnk); AddMenuItem("Steinschlag","ScrollBuy(MARK)",MARK,pClnk); AddMenuItem("Warploch","ScrollBuy(MGWP)",MGWP,pClnk); AddMenuItem("Meteoritenhagel","ScrollBuy(MMTR)",MMTR,pClnk); AddMenuItem("Antiheilfluch","ScrollBuy(CAHE)",CAHE,pClnk); AddMenuItem("Verwirrungsfluch","ScrollBuy(CCNF)",CCNF,pClnk); AddMenuItem("Stolperfluch","ScrollBuy(CFAL)",CFAL,pClnk); AddMenuItem("Schmerzensfluch","ScrollBuy(CPAN)",CPAN,pClnk); AddMenuItem("Zufälliger Gegenstand","ScrollBuy(GSHZ)",GSHZ,pClnk); AddMenuItem("Zufallszauber","ScrollBuy(RMMG)",RMMG,pClnk); } public func BuyDeco() { var pOwner; CreateMenu(BED1, pClnk, this(), C4MN_Extra_Value,0,0,0,1); AddMenuItem("Kerze","ItemBuy(CNDL)",CNDL,pClnk); if(iPlans == 1) { if(GetPlayerTeam(pOwner = GetOwner(pClnk)) == 1) { AddMenuItem("Wandteppich","ItemBuy(DCO3)",DCO1,pClnk); } else { AddMenuItem("Wandteppich","ItemBuy(DCO4)",DCO2,pClnk); } } AddMenuItem("Tisch","ItemBuy(TABL)",TABL,pClnk); AddMenuItem("Bett","ItemBuy(BED1)",BED1,pClnk); AddMenuItem("Bogenständer","ItemBuy(BWRC)",BWRC,pClnk); AddMenuItem("Schildständer","ItemBuy(SHRC)",SHRC,pClnk); AddMenuItem("Speerständer","ItemBuy(SPRC)",SPRC,pClnk); AddMenuItem("Schwertständer","ItemBuy(SWRC)",SWRC,pClnk); AddMenuItem("Holzbehälter","ItemBuy(WODC)",WODC,pClnk); AddMenuItem("Zeltpack","ItemBuy(TENP)",TENP,pClnk); AddMenuItem("Lagerfeuer","ItemBuy(CPFR)",CPFR,pClnk); } protected func SellItem() { CreateMenu(SELL, pClnk, this(), C4MN_Extra_Value, "Deine Taschen sind leer."); for(var i=0;i if(ContentsCount(GetID(Contents(i,pClnk)),pClnk)==1) AddMenuItem(Format("Verkaufen: %s",GetName(Contents(i,pClnk))),"SellIt",GetID(Contents(i,pClnk)),pClnk, ContentsCount(GetID(Contents(i,pClnk)),pClnk), GetMenuSelection(pClnk)); else { AddMenuItem(Format("Verkaufen: %s",GetName(Contents(i,pClnk))),"SellIt",GetID(Contents(i,pClnk)),pClnk, ContentsCount(GetID(Contents(i,pClnk)),pClnk), GetMenuSelection(pClnk)); var j=i; while(j { j++; if(GetID(Contents(j,pClnk))!=GetID(Contents(i,pClnk))) {i=j-1; break;} } } } public func SellIt(id idObj, int iPos) { if(FindObject(NOMO)) { RemoveObject(FindContents(idObj,pClnk)); Sound("Cash"); SellItem(); } else { var obj, itm, i; while(obj=FindObject(0,-15,-15,30,30,OCF_CrewMember(),"Push",this(),0,obj)) i++; if(i!=1) {CloseMenu(FindObject(0,0,0,0,0,OCF_CrewMember(),"Push",this()));return(Message("...",this()));} obj=FindObject(0,-15,-15,30,30,OCF_CrewMember(),"Push",this(),0,obj); itm=FindContents(idObj, obj); if(!itm) return(Sound("CommandFailure*")); var cost=GetValue(itm); RemoveObject(itm); DoWealth(GetOwner(obj),cost); Sound("Cash"); iPos=GetMenuSelection(obj); CloseMenu(pClnk); SellItem(); SelectMenuItem(iPos,obj); return(); } } protected func ItemBuy(id pItem, int ExtraValue) { if(FindObject(NOMO)) { CreateContents(pItem, pClnk); Sound("Cash"); return(0); } //Genügend Geld? Überprüfen! if(GetWealth(GetOwner(pClnk)) >= GetValue(0, pItem)) { //Objekt in Hosentasche teleportieren (kein Cheat! D:) CreateContents(pItem, pClnk); //Geld abziehen und Ka-Sching! SetWealth(GetOwner(pClnk), GetWealth(GetOwner(pClnk)) -GetValue(0, pItem)); Sound("Cash"); } else { Sound("Error", false); Message("Nicht genug Geld!", this()); } } protected func ScrollBuy(id idMagic) { if(FindObject(NOMO)) { if(ObjectCount2(Find_Container(pClnk),Find_ID(SCRL)) < 3) { CreateContents(SCRL, pClnk)->SetSpell(idMagic); Sound("Cash"); return(0); } else { Sound("Error"); Message("Nicht über 3 Schriftrollen!",pClnk); } } else { if(GetWealth(GetOwner(pClnk)) >= GetValue(0, idMagic)) { if(ObjectCount2(Find_Container(pClnk),Find_ID(SCRL)) < 3) { //Objekt in Hosentasche teleportieren (kein Cheat! D:) var pScroll = CreateContents(SCRL, pClnk); pScroll -> SetSpell(idMagic); //Geld abziehen und Ka-Sching! SetWealth(GetOwner(pClnk), GetWealth(GetOwner(pClnk)) -GetValue(0, idMagic)); Sound("Cash"); } else { Message("Nicht über 3 Schriftrollen!",pClnk); Sound("Error"); } } else { Sound("Error", false); Message("Nicht genug Geld!", this()); } } }
Gefällt mir Gefällt mir nicht