Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var objtype := 0;
- var plan := 0;
- var amounts;
- var j := 0;
- var i := 0;
- var godly := 0;
- var glorious := 0;
- var greater := 0;
- var good := 0;
- var lesser := 0;
- var mat_names;
- var materials;
- var plan_name := "Guggi";
- var godlyhouses := {0xD8A2, 0x6024, 0xd8a1, 0xd8a2 };
- var glorioushouses := {0x6023, 0xd8a5, 0xd8af};
- var greaterhouses := {0x6021, 0x6022, 0xd8a6, 0xd8a7, 0xd8b3, 0xd8b4};
- var goodhouses := {0x6020, 0x6026, 0xd8a3, 0xd8a4, 0xd8a8, 0xd8aa, 0xd8ab, 0xd8ae, 0xd8b0, 0xd8b1};
- var lesserhouses := {0x6019, 0x601A, 0x601B, 0x601C, 0x601D, 0x601e, 0xd8a9, 0xd8ac, 0xd8ad, 0xd8b2};
- var px := who.x, py := who.y;
- for(i := 0; i <= amt-1; i := i +1)
- if(scrolls.amount < 1)
- SendSysMessage(who, "You dont have enough blank scrolls");
- return 0;
- else
- SubtractAmount(scrolls,1);
- PlaySoundEffect(who, 0x24a);
- PrintTextAbovePrivate( who, "You start drawing..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- SleepMS(2500);
- if((px != who.x) OR (py != who.y))
- SendSysMessage(who, "You move and stop drawing.");
- return;
- endif
- PrintTextAbovePrivate( who, "Calculating costs..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- SleepMS(2500);
- if((px != who.x) OR (py != who.y))
- SendSysMessage(who, "You move and stop drawing.");
- return;
- endif
- PrintTextAbovePrivate( who, "Finalizing drawing..", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- SleepMS(2500);
- if((px != who.x) OR (py != who.y))
- SendSysMessage(who, "You move and stop drawing.");
- return;
- endif
- var number := RandomInt(301);
- var success := 1;
- var boats := {0x6028, 0x6027, 0x6029, 0x602A, 0x602B, 0x602C};
- if(who.cmdlevel > 1)
- number := 163;
- endif
- if(number == 163)
- var number2 := RandomInt(101);
- if(number2 <=25)
- var number3 := RandomInt(3);
- if((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 100)
- number3 := RandomInt(6) +1;
- objtype := boats[number3];
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 85)
- number3 := RandomInt(4) +1;
- objtype := boats[number3];
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 70)
- number3 := RandomInt(2) +1;
- objtype := boats[number3];
- else
- PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- success := 0;
- endif
- else
- var number3 := RandomInt(224);
- if((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 125)
- number3 := RandomInt(401);
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 120)
- number3 := Randomint(400);
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 115)
- number3 := Randomint(380);
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 110)
- number3 := Randomint(340);
- elseif((GetEffectiveSkill(who, SKILLID_INSCRIPTION)) >= 105 )
- number3 := Randomint(224);
- else
- PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- success := 0;
- endif
- if(number3 == 400) // 125
- var number4 := RandomInt(101);
- if(number4 > 5)
- var rnumber := RandomInt(godlyhouses.size());
- objtype := godlyhouses[rnumber+1];
- else
- objtype := 0x6025;
- endif
- elseif(number3 >= 380) // 120
- var rnumber := RandomInt(glorioushouses.size());
- objtype := glorioushouses[rnumber+1];
- elseif(number3 >= 339) // 110
- var rnumber := RandomInt(greaterhouses.size());
- objtype := greaterhouses[rnumber+1];
- elseif(number3 >= 224) // 90
- var rnumber := RandomInt(goodhouses.size());
- objtype := goodhouses[rnumber+1];
- else // 70
- var rnumber := RandomInt(lesserhouses.size());
- objtype := lesserhouses[rnumber+1];
- endif
- endif
- if(success == 1)
- plan := CreateItemInBackpack(who, 0x875, 1);
- plan_name := cfg_plans[objtype]."Name";
- if(objtype == 0x6019 || objtype == 0x601A || objtype == 0x601B || objtype == 0x601C || objtype == 0x601D || objtype == 0x601e || objtype == 0xd8ac) // small houses
- materials := { 0x879, 0x884, 0x876, 0x880, 0x9031, 0x1BD7, 0x102F, "anyingot", "anylog"};
- mat_names := {"house walls", "roof deed", "cement bags", "wooden door", "iron ingots", "boards", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 4, 1, 40, 1, 1000, 3000, 1, 200, 200};
- elseif(objtype == 0xd8b2) // Tree house
- materials := { 0x879, 0x884, 0x876, 0x880, 0x1BD7, 0x102F, "anyingot", "anylog"};
- mat_names := {"house walls", "roof deed", "cement bags", "wooden door", "boards", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 4, 1, 40, 1, 3000, 1, 180, 180};
- elseif(objtype == 0xd8ad || objtype == 0xd8a9) // Outpost and plaster residence
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
- amounts := { 8, 80, 2, 5500, 1500, 2, 1, 400, 400};
- elseif(objtype == 0xd8ae) // Small tower
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden door", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
- amounts := { 8, 80, 1, 2000, 2000, 2, 3, 400, 400};
- elseif(objtype == 0xd8a4) // Stone gatehouse
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
- amounts := { 9, 96, 2, 6000, 2000, 2, 2, 450, 450};
- elseif(objtype == 0xd8aa) // Sandstone house
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
- amounts := { 10, 100, 3, 7000, 3000, 2, 2, 500, 500};
- elseif(objtype == 0xd8ab) // Sandstone residence
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal door", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
- amounts := { 10, 100, 1, 7000, 3000, 2, 1, 500, 500};
- elseif(objtype == 0xd8a3) //Domvilla
- materials := { 0x879, 0x876, 0x877, 0x880 , 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "wooden door", "boards", "iron ingots", "nail boxes", "stairs", "colored ingots", "colored logs"};
- amounts := { 8, 120, 2, 1, 2000, 2000, 2, 3, 400, 400};
- elseif(objtype == 0xd8a8) // Merchant shop
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 10, 120, 3, 7000, 4000, 2, 600, 600};
- elseif(objtype == 0x6026) // Large patio house
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 12, 126, 5, 6600, 3500, 3, 660, 660};
- elseif(objtype == 0x6020 || objtype == 0xd8b0) // Large brick house and large brick house east
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 12, 120, 4, 6500, 3400, 3, 650, 650};
- elseif(objtype == 0xd8b4) // Two story large brick house
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "colored ingots", "colored logs"};
- amounts := { 16, 130, 4, 7000, 4000, 3, 1, 800, 800};
- elseif(objtype == 0xd8a6) // Large log cabin
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x102F, 0x885, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "nail boxes", "stairs", "colored ingots", "colored logs"};
- amounts := { 20, 150, 3, 19000, 5, 2, 1000, 1000};
- elseif(objtype == 0xd8b1) // Five story estate
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 26, 182, 3, 9000, 5000, 5, 5, 300, 300, 200, 100, 100, 20, 100, 20, 1000, 1000};
- elseif(objtype == 0xd8a7) // Marble hacienda
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9048, 0x9049, 0x904A, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stair", "topaz ingots", "augite ingots", "hematite ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 16, 160, 4, 7000, 1000, 3, 1, 200, 200, 100, 100, 20, 800, 800};
- elseif(objtype == 0xd8b3) // Two story patio house
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 20, 182, 6, 12000, 8000, 5, 1, 300, 300, 200, 120, 120, 30, 100, 20, 1000, 1000};
- elseif(objtype == 0x6022 || objtype == 0x6021) // Two story stone and plaster house and Two story wood and plaster house
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stair", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 18, 190, 4, 10000, 7000, 5, 1, 300, 300, 200, 120, 120, 30, 100, 20, 1000, 1000};
- elseif(objtype == 0xd8a5) // Small castle
- materials := { 0x879, 0x876, 0x880, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 40, 250, 3, 2, 10000, 10000, 5, 2, 400, 350, 250, 200, 200, 100, 40, 200, 80, 2000, 2000};
- elseif(objtype == 0xd8af) // Brick basement
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 50, 280, 5, 10000, 12000, 7, 3, 400, 350, 300, 300, 300, 100, 100, 250, 100, 2500, 2500};
- elseif(objtype == 0x6023) // Tower
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 50, 280, 3, 10000, 12000, 7, 3, 400, 350, 300, 300, 300, 100, 100, 250, 100, 2500, 2500};
- elseif(objtype == 0xd8a1) // Hacienda
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 60, 320, 16, 12000, 14000, 7, 1, 600, 500, 450, 400, 350, 200, 150, 50, 400, 150, 3000, 3000};
- elseif(objtype == 0x6024) // Keep
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 90, 480, 2, 18000, 21000, 10, 5, 900, 750, 675, 600, 450, 300, 225, 100, 600, 225, 4500, 4500};
- elseif(objtype == 0xd8a2) // Arena
- materials := { 0x879, 0x876, 0x880, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "wooden doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 60, 500, 4, 12000, 14000, 7, 4, 600, 500, 450, 400, 350, 200, 150, 50, 400, 150, 3000, 3000};
- elseif(objtype == 0x6025) // G-castle
- materials := { 0x879, 0x876, 0x877, 0x1BD7, 0x9031, 0x102F, 0x885, 0x9038, 0x9048, 0x9049, 0x904A, 0x904B, 0x904C, 0x904D, 0x904E, 0x7055, 0x7057, "anyingot", "anylog"};
- mat_names := {"house walls", "cement bags", "metal doors", "boards", "iron ingots", "nail boxes", "stairs", "azurite ingots", "topaz ingots", "augite ingots", "hematite ingots", "dolerite ingots", "obsidean ingots", "corundum ingots", "nexus ingots", "silver logs", "dark logs", "colored ingots", "colored logs"};
- amounts := { 135, 720, 8, 27000, 31500, 15, 2, 1350, 1125, 1000, 900, 700, 450, 350, 200, 900, 350, 6750, 6750};
- elseif(objtype == 0x6027) // Small boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 8, 1, 1 , 3000, 1500, 2, 150, 300};
- elseif(objtype == 0x6028) // Small dragon boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 8, 1, 1 , 3000, 1500, 2, 300, 500};
- elseif(objtype == 0x6029) // Medium boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 16, 2, 1 , 5000, 3000, 4, 600, 800};
- elseif(objtype == 0x602A) // Medium dragon boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 16, 2, 1 , 5000, 3000, 4, 700, 900};
- elseif(objtype == 0x602B) // Large boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 24, 3, 1 , 8000, 6000, 8, 1000, 1000};
- elseif(objtype == 0x602C) // Large dragon boat
- materials := { 0x881, 0x883, 0x882, 0x1BD7, 0x9031, 0x102F, "anyingot", "anylog"};
- mat_names := {"boat decks", "Sail deed", "Tiller deed", "boards", "iron ingots", "nail boxes", "colored ingots", "colored logs"};
- amounts := { 24, 3, 1 , 8000, 6000, 8, 1100, 1100};
- endif
- PlayStationaryEffect(who.x,who.y,who.z,FX_HEAL_EFFECT,10);
- PrintTextAbovePrivate( who, "You finish the plan and place it in your pack", who, font := _DEFAULT_TEXT_FONT, color := 238 );
- playsoundEffect (who, 0x1ed);
- SetObjProperty( plan, "materials", materials );
- SetObjProperty( plan, "mat_names", mat_names );
- SetObjProperty( plan, "amounts", amounts );
- SetObjProperty( plan, "objtype", objtype );
- SetObjProperty( plan, "plan_name", plan_name );
- SetName(plan, "Architect's plan for a "+plan_name);
- endif
- j := j+1;
- else
- PrintTextAbovePrivate( who, "You fail at making the plan", who, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
- endif
- SleepMS(2500);
- endif
- endfor
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement